]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/user-annotations/dump-adt-brace-struct.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / nll / user-annotations / dump-adt-brace-struct.rs
1 // Unit test for the "user substitutions" that are annotated on each
2 // node.
3
4 // compile-flags:-Zverbose
5
6 #![allow(warnings)]
7 #![feature(rustc_attrs)]
8
9 struct SomeStruct<T> { t: T }
10
11 #[rustc_dump_user_substs]
12 fn main() {
13 SomeStruct { t: 22 }; // Nothing given, no annotation.
14
15 SomeStruct::<_> { t: 22 }; // Nothing interesting given, no annotation.
16
17 SomeStruct::<u32> { t: 22 }; // No lifetime bounds given.
18
19 SomeStruct::<&'static u32> { t: &22 }; //~ ERROR [&ReStatic u32]
20 }