]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-const-impl-wrong-lifetime.stderr
New upstream version 1.25.0+dfsg1
[rustc.git] / src / test / ui / associated-const-impl-wrong-lifetime.stderr
1 error[E0308]: mismatched types
2 --> $DIR/associated-const-impl-wrong-lifetime.rs:18:5
3 |
4 18 | const NAME: &'a str = "unit";
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6 |
7 = note: expected type `&'static str`
8 found type `&'a str`
9 note: the lifetime 'a as defined on the impl at 17:1...
10 --> $DIR/associated-const-impl-wrong-lifetime.rs:17:1
11 |
12 17 | impl<'a> Foo for &'a () {
13 | ^^^^^^^^^^^^^^^^^^^^^^^
14 = note: ...does not necessarily outlive the static lifetime
15
16 error: aborting due to previous error
17