]> git.proxmox.com Git - rustc.git/blame - 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
CommitLineData
ff7c6d11
XL
1error[E0308]: mismatched types
2 --> $DIR/associated-const-impl-wrong-lifetime.rs:18:5
3 |
418 | const NAME: &'a str = "unit";
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6 |
7 = note: expected type `&'static str`
8 found type `&'a str`
9note: the lifetime 'a as defined on the impl at 17:1...
10 --> $DIR/associated-const-impl-wrong-lifetime.rs:17:1
11 |
2c00a5a8
XL
1217 | impl<'a> Foo for &'a () {
13 | ^^^^^^^^^^^^^^^^^^^^^^^
ff7c6d11
XL
14 = note: ...does not necessarily outlive the static lifetime
15
16error: aborting due to previous error
17