]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs
Rollup merge of #106751 - clubby789:const-intrinsic, r=GuillaumeGomez
[rust.git] / tests / ui / suggestions / missing-lifetime-in-assoc-const-type.rs
1 trait ZstAssert: Sized {
2     const A: &str = ""; //~ ERROR missing lifetime specifier
3     const B: S = S { s: &() }; //~ ERROR missing lifetime specifier
4     const C: &'_ str = ""; //~ ERROR missing lifetime specifier
5     const D: T = T { a: &(), b: &() }; //~ ERROR missing lifetime specifier
6 }
7
8 struct S<'a> {
9     s: &'a (),
10 }
11 struct T<'a, 'b> {
12     a: &'a (),
13     b: &'b (),
14 }
15
16 fn main() {}