You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ rustc hello.rs -Wunnameable_types -Zunstable-options
warning: unknown lint: `unnameable_types`
|
= note: the `unnameable_types` lint is unstable
= note: see issue #48054 <https://github.com/rust-lang/rust/issues/48054> for more information
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
= note: `#[warn(unknown_lints)]` on by default
The warnings can only be removed by
either additionally passing -Aunknown_lints, which is bad,
or adding #![feature(type_privacy_lints)] to source code of all crates in which we want to enable the lint, which may be dozens or hundreds crates like in case of Enable type privacy lints in rustc #113284, making this alternative even worse than the first one.
Warnings about unstable lints passed from command line should be silence-able from command line as well, with something like -Zunstable-options.
I tried this code:
I expected to see this happen:
Successful compilation, no warnings.
Instead, this happened:
The warnings can only be removed by
-Aunknown_lints, which is bad,#![feature(type_privacy_lints)]to source code of all crates in which we want to enable the lint, which may be dozens or hundreds crates like in case of Enable type privacy lints in rustc #113284, making this alternative even worse than the first one.Warnings about unstable lints passed from command line should be silence-able from command line as well, with something like
-Zunstable-options.Meta
rustc --version --verbose: