mirror of https://github.com/rust-lang/rust.git
`sudo CI=green` && Review changes <3
This commit is contained in:
parent
d9e32a69a7
commit
b124b3666e
|
@ -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)]
|
||||
|
|
|
@ -608,7 +608,7 @@ declare_lint! {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#![allow(stable_features)]
|
||||
#![feature(cfg_target_feature)]
|
||||
#![feature(lint_reasons)]
|
||||
|
||||
use std::env;
|
||||
|
||||
|
|
Loading…
Reference in New Issue