Debian Codegraph @

gcc/testsuite/rust/compile/torture/must_use2.rs

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 trait A {
5 #[must_use]
6 fn test() -> i32;
7 }
8
9 struct S;
10 impl A for S {
11 fn test() -> i32 {
12 123
13 }
14 }
15
16 fn main() {
17 S::test();
18 // { dg-warning "ignoring return value of" "" { target *-*-* } .-1 }
19 }