2017-12-10 13:47:55 -06:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/associated-const-impl-wrong-lifetime.rs:7:5
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | const NAME: &'a str = "unit";
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
|
|
|
|
|
|
|
|
= note: expected type `&'static str`
|
|
|
|
found type `&'a str`
|
2019-10-10 18:58:35 -05:00
|
|
|
note: the lifetime `'a` as defined on the impl at 6:6...
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/associated-const-impl-wrong-lifetime.rs:6:6
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | impl<'a> Foo for &'a () {
|
2018-06-27 18:44:39 -05:00
|
|
|
| ^^
|
2017-12-10 13:47:55 -06:00
|
|
|
= note: ...does not necessarily outlive the static lifetime
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|