summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/missing-lifetime-in-assoc-const-type.rs
blob: 38332627f4c87a86a2a819151f6d0c40769bb9b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
trait ZstAssert: Sized {
    const A: &str = ""; //~ ERROR missing lifetime specifier
    const B: S = S { s: &() }; //~ ERROR missing lifetime specifier
    const C: &'_ str = ""; //~ ERROR missing lifetime specifier
    const D: T = T { a: &(), b: &() }; //~ ERROR missing lifetime specifier
}

struct S<'a> {
    s: &'a (),
}
struct T<'a, 'b> {
    a: &'a (),
    b: &'b (),
}

fn main() {}