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