Open
Description
While undefined "unscoped" lints lead to the compiler emitting the warn-by-default lint unknown-lints
#![allow(undefined)] //~ WARN unknown lint `undefined`
warning: unknown lint: `undefined`
--> src/lib.rs:1:10
|
1 | #![allow(undefined)]
| ^^^^^^^^^
|
= note: `#[warn(unknown_lints)]` on by default
the same doesn't happen for undefined lints scoped under rustc
:
//@ check-pass
#![deny(unknown_lints)]
#![allow(rustc::undefined)]
It would be beneficial if rustc would emit unknown_lints
in these cases.
Built-in tools like rustfmt
and clippy
or tools defined via register_tool
are responsible for dealing with undefined lints themselves. However, the ~~tool modules~ lint scope rustc
is owned by rustc and should therefore do the checking.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
fmease commentedon Mar 21, 2025
fmease commentedon Mar 21, 2025
Ooh, it does result in it getting emitted if
-Zunstable-options
is passed. What on earth?[-]Undefined lints scoped under `rustc` or `rustdoc` don't result in lint unknown-lints getting emitted[/-][+]Undefined lints scoped under `rustc` or `rustdoc` don't result in lint unknown-lints getting emitted (unless `-Zinternal-features` is passed)[/+][-]Undefined lints scoped under `rustc` or `rustdoc` don't result in lint unknown-lints getting emitted (unless `-Zinternal-features` is passed)[/-][+]Undefined lints scoped under `rustc` or `rustdoc` don't result in lint unknown-lints getting emitted (unless `-Zinternal-options` is passed)[/+][-]Undefined lints scoped under `rustc` or `rustdoc` don't result in lint unknown-lints getting emitted (unless `-Zinternal-options` is passed)[/-][+]Undefined lints scoped under `rustc` or `rustdoc` don't result in lint unknown-lints getting emitted (unless `-Zunstable-options` is passed)[/+][-]Undefined lints scoped under `rustc` or `rustdoc` don't result in lint unknown-lints getting emitted (unless `-Zunstable-options` is passed)[/-][+]Undefined lints scoped under `rustc` don't result in lint unknown-lints getting emitted (unless `-Zunstable-options` is passed)[/+]fmease commentedon Mar 21, 2025
Actually lint scope
rustdoc
doesn't have this problem. Updated the issue description.