diff --git a/compiler/rustc_builtin_macros/src/lib.rs b/compiler/rustc_builtin_macros/src/lib.rs index b3ec9a577b5..f8d93666145 100644 --- a/compiler/rustc_builtin_macros/src/lib.rs +++ b/compiler/rustc_builtin_macros/src/lib.rs @@ -5,6 +5,7 @@ #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] +#![cfg_attr(bootstrap, feature(lint_reasons))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(assert_matches)] @@ -12,7 +13,6 @@ #![feature(decl_macro)] #![feature(if_let_guard)] #![feature(let_chains)] -#![cfg_attr(bootstrap, feature(lint_reasons))] #![feature(proc_macro_internals)] #![feature(proc_macro_quote)] #![feature(rustdoc_internals)] diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 39066ddcf00..472e93d202d 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -608,7 +608,7 @@ } declare_lint! { - /// The `unfulfilled_lint_expectations` lint warns if a lint expectation is + /// The `unfulfilled_lint_expectations` lint detects when a lint expectation is /// unfulfilled. /// /// ### Example diff --git a/src/doc/rustc/src/lints/levels.md b/src/doc/rustc/src/lints/levels.md index 1558e879093..18e827bd3c9 100644 --- a/src/doc/rustc/src/lints/levels.md +++ b/src/doc/rustc/src/lints/levels.md @@ -47,8 +47,8 @@ fn main() { #[expect(unused_variables)] let unused = "Everyone ignores me"; - #[expect(unused_variables)] - let used = "I'm useful"; + #[expect(unused_variables)] // `unused_variables` lint is not emitted + let used = "I'm useful"; // the expectation is therefore unfulfilled println!("The `used` value is equal to: {:?}", used); } ``` @@ -65,8 +65,8 @@ warning: this lint expectation is unfulfilled = note: `#[warn(unfulfilled_lint_expectations)]` on by default ``` -This level can only be defined via the `#[expect]` attribute and not via the -console. Lints with the special 'force-warn' lint will still be emitted as usual. +This level can only be defined via the `#[expect]` attribute, there is no equivalent +flag. Lints with the special 'force-warn' level will still be emitted as usual. ## warn diff --git a/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs b/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs index f5e01b431ad..a312df5a43a 100644 --- a/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs +++ b/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs @@ -1,5 +1,5 @@ //! Tests macro_metavars_in_unsafe with default configuration -#![feature(decl_macro, lint_reasons)] +#![feature(decl_macro)] #![warn(clippy::macro_metavars_in_unsafe)] #![allow(clippy::no_effect)] diff --git a/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.stderr b/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.stderr index 138eb602949..d6b97f6fde1 100644 --- a/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.stderr +++ b/src/tools/clippy/tests/ui-toml/macro_metavars_in_unsafe/default/test.stderr @@ -1,12 +1,3 @@ -error: the feature `lint_reasons` has been stable since 1.81.0-dev and no longer requires an attribute to enable - --> tests/ui-toml/macro_metavars_in_unsafe/default/test.rs:2:24 - | -LL | #![feature(decl_macro, lint_reasons)] - | ^^^^^^^^^^^^ - | - = note: `-D stable-features` implied by `-D warnings` - = help: to override `-D warnings` add `#[allow(stable_features)]` - error: this macro expands metavariables in an unsafe block --> tests/ui-toml/macro_metavars_in_unsafe/default/test.rs:19:9 | @@ -192,5 +183,5 @@ LL | | } = help: consider expanding any metavariables outside of this block, e.g. by storing them in a variable = help: ... or also expand referenced metavariables in a safe context to require an unsafe block at callsite -error: aborting due to 15 previous errors +error: aborting due to 14 previous errors diff --git a/tests/ui/sse2.rs b/tests/ui/sse2.rs index 9ed6f6fefbd..a1894cc03db 100644 --- a/tests/ui/sse2.rs +++ b/tests/ui/sse2.rs @@ -2,7 +2,6 @@ #![allow(stable_features)] #![feature(cfg_target_feature)] -#![feature(lint_reasons)] use std::env;