2022-07-24 19:33:26 +00:00
|
|
|
error[E0308]: const not compatible with trait
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/associated-const-impl-wrong-lifetime.rs:7:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | const NAME: &'a str = "unit";
|
2022-09-30 16:56:07 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-11-13 22:16:56 +00:00
|
|
|
= note: expected reference `&'static str`
|
|
|
|
found reference `&'a str`
|
2021-10-05 12:11:51 +00:00
|
|
|
note: the lifetime `'a` as defined here...
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/associated-const-impl-wrong-lifetime.rs:6:6
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | impl<'a> Foo for &'a () {
|
2018-06-27 23:44:39 +00:00
|
|
|
| ^^
|
2017-12-10 19:47:55 +00:00
|
|
|
= note: ...does not necessarily outlive the static lifetime
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|