about summary refs log tree commit diff
path: root/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs
blob: f83ae2438e6d5dd1fffa6a9eeadd96c0afb575e9 (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, T: Foo<'a>>() -> &'static u32 {
    T::C //~ ERROR
}

fn main() {
}