1
Fork 0

Use revisions for NLL in object-lifetime

This commit is contained in:
Jack Huey 2022-05-21 14:45:57 -04:00
parent 8220be5240
commit 99daba2a4a
15 changed files with 67 additions and 35 deletions

View file

@ -1,18 +0,0 @@
error[E0308]: mismatched types
--> $DIR/object-lifetime-default-from-rptr-struct-error.rs:20:12
|
LL | ss.t = t;
| ^ lifetime mismatch
|
= note: expected reference `&'a MyBox<(dyn Test + 'static)>`
found reference `&'a MyBox<(dyn Test + 'a)>`
note: the lifetime `'a` as defined here...
--> $DIR/object-lifetime-default-from-rptr-struct-error.rs:19:6
|
LL | fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
| ^^
= note: ...does not necessarily outlive the static lifetime
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.