Debian Codegraph @

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

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 struct Foo<T>(T);
5
6 struct Bar {
7 a: Foo<i32>,
8 b: bool,
9 // { dg-warning "field is never read" "" { target *-*-* } .-1 }
10 }
11
12 fn main() {
13 let a = Foo::<i32>(123);
14 let b: Bar = Bar { a: a, b: true };
15 let c: i32 = b.a.0;
16 // { dg-warning "unused name" "" { target *-*-* } .-1 }
17 }