about summary refs log tree commit diff
path: root/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs
blob: daa0d7bc24140b1cbf6d5906b07e950fe8616d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(nll)]

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() {
}