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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
610 B
Text
Raw Normal View History

error[E0308]: const not compatible with trait
2018-12-25 08:56:47 -07:00
--> $DIR/associated-const-impl-wrong-lifetime.rs:7:5
|
2018-02-23 03:42:32 +03:00
LL | const NAME: &'a str = "unit";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected reference `&'static str`
found reference `&'a str`
note: the lifetime `'a` as defined here...
2018-12-25 08:56:47 -07:00
--> $DIR/associated-const-impl-wrong-lifetime.rs:6: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`.