summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs
blob: e0400b2cc0267fb1d393bce8689490d683289d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
trait Foo<'a> {
    const C: &'a u32;
}

impl<'a, T> Foo<'a> for T {
    const C: &'a u32 = &22;
}

fn foo<'a>(_: &'a u32) -> &'static u32 {
    <() as Foo<'a>>::C //~ ERROR
}

fn main() {
}