blob: 8b514f21283478a26931c6b1e8e7b867530b2da6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// 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();
}
|