no_implicit_prelude attribute is not validated properly with unused_attributes lint #81104
Labels
A-attributes
Area: #[attributes(..)]
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The
no_implicit_prelude
attribute can only be applied to modules and the crate root. However, it seems to be silently ignored in all other positions:I expected to see this happen: The UNUSED_ATTRIBUTES lint should trigger for all positions where it is ignored (with a future-incompatible note, since this should never have been allowed), possibly transitioned to a hard error in the future.
Instead, this happened: Attribute is ignored without a warning.
NOTE: There is a test which checks this, but it is only firing because there is already a crate-level
no_implicit_prelude
attribute.rustc 1.51.0-nightly (c97f11af7 2021-01-10)
The text was updated successfully, but these errors were encountered: