summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-consts/associated-const-impl-wrong-lifetime.rs
blob: 63bac96135b42f4c9763d253924ab3bf40e44f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
trait Foo {
    const NAME: &'static str;
}


impl<'a> Foo for &'a () {
    const NAME: &'a str = "unit";
    //~^ ERROR const not compatible with trait
}

fn main() {}