]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-consts/associated-const-impl-wrong-lifetime.rs
Rollup merge of #105983 - compiler-errors:issue-105981, r=tmiasko
[rust.git] / src / test / ui / associated-consts / associated-const-impl-wrong-lifetime.rs
1 trait Foo {
2     const NAME: &'static str;
3 }
4
5
6 impl<'a> Foo for &'a () {
7     const NAME: &'a str = "unit";
8     //~^ ERROR const not compatible with trait
9 }
10
11 fn main() {}