Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing a lint in a deny'd group via cli flags #58211

Closed
Byter09 opened this issue Feb 6, 2019 · 1 comment · Fixed by #67885
Closed

Allowing a lint in a deny'd group via cli flags #58211

Byter09 opened this issue Feb 6, 2019 · 1 comment · Fixed by #67885
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@Byter09
Copy link

Byter09 commented Feb 6, 2019

Hello.

So at first I thought this was a Clippy issue as can be seen here: rust-lang/rust-clippy#3745.

Turns out this is a RustC issue. So the problem is, that we have a lot of smaller projects that are not in a workspace but still want a unified list of lints that are denied or allowed. Adding this list to every lib.rs or main.rs is not viable as this would require constant updating of all lint lists in case we can deny an allowed lint that is forbidden in a group after fixing the cause.

We're using protobuf in one of the projects and this allows me to test this bug with
RUSTFLAGS="--deny rust-2018-idioms --allow elided-lifetimes-in-paths" cargo check. The anonymous lifetime lint still pops up even though it should be allowed.

Having

#[deny(rust_2018_idioms)]
#[allow(elided_lifetimes_in_paths)]

in the lib.rs/main.rs works as expected.

Is this indeed a bug or expected behaviour?

EDIT: Oh and I nearly forgot, here's my rustc --version --verbose output:

rustc 1.32.0 (9fda7c223 2019-01-16)
binary: rustc
commit-hash: 9fda7c2237db910e41d6a712e9a2139b352e558b
commit-date: 2019-01-16
host: x86_64-unknown-linux-gnu
release: 1.32.0
LLVM version: 8.0
@Byter09 Byter09 changed the title Allowing a lint in a deny'd group Allowing a lint in a deny'd group via cli flags Feb 6, 2019
@jonas-schievink jonas-schievink added the A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. label Feb 6, 2019
@tyranron
Copy link

tyranron commented Nov 6, 2019

Just hit this with Clippy (see rust-lang/rust-clippy#4778 )

Is there any plans/opinions on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants