]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/dump-adt-brace-struct.rs
Rollup merge of #106946 - dtolnay:hashlinecolumn, r=m-ou-se
[rust.git] / tests / 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 }