Nested tool lints

#1

Based on tool lints and nested imports I just had a thought (inspired by an u.rl.o post) that it could make sense to allow nested lint names, i.e. allow

#![allow(clippy::{
    almost_swapped,
    approx_constant,
})]

as meaning the equivalent of

#![allow(
    clippy::almost_swapped,
    clippy::approx_constant,
)]

I was wondering if anyone has examples where this would make a significant difference? Is referring to multiple Clippy lints common enough to make RFC-ing this worthwhile?

(The same could be done for tool attributes, but I don’t know of any tool attributes in use currently).

6 Likes

#2

My first impression is that this seems like a small and reasonable extension…

cc @petrochenkov

0 Likes

#3

I’d appreciate this since I rely heavily on many Clippy lints.

0 Likes