granite-rust/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr

19 lines
600 B
Text
Raw Normal View History

error[E0308]: mismatched types
--> $DIR/associated-const-impl-wrong-lifetime.rs:18:5
|
2018-02-23 03:42:32 +03:00
LL | const NAME: &'a str = "unit";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected type `&'static str`
found type `&'a str`
note: the lifetime 'a as defined on the impl at 17:6...
--> $DIR/associated-const-impl-wrong-lifetime.rs:17:6
|
2018-02-23 03:42:32 +03:00
LL | impl<'a> Foo for &'a () {
| ^^
= 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`.