mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
20 lines
347 B
Rust
20 lines
347 B
Rust
// Regression test for issue #130142
|
|
|
|
// Checks that we emit no warnings when a lint's level
|
|
// is overridden by an expect or allow attr on a Stmt node
|
|
|
|
//@ check-pass
|
|
|
|
#[must_use]
|
|
pub fn must_use_result() -> i32 {
|
|
42
|
|
}
|
|
|
|
fn main() {
|
|
#[expect(unused_must_use)]
|
|
must_use_result();
|
|
|
|
#[allow(unused_must_use)]
|
|
must_use_result();
|
|
}
|