Description
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