summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/user-annotations/constant-in-expr-normalize.rs
blob: b7095430d8bd2849fca33b546c4839e620fc4e01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
trait Mirror {
    type Me;
}

impl<T> Mirror for T {
    type Me = T;
}

trait Foo<'a> {
    const C: <&'a u32 as Mirror>::Me;
}

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