]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-consts/associated-const-impl-wrong-lifetime.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[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() {}