rust/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr

24 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0491]: in type `&'x (dyn for<'z> Trait1<<T as Trait2<'y, 'z>>::Foo> + 'x)`, reference has a longer lifetime than the data it references
--> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:31:1
|
LL | / fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
LL | | //~^ ERROR reference has a longer lifetime than the data it references
LL | | {
LL | | }
| |_^
|
note: the pointer is valid for the lifetime 'x as defined on the function body at 31:11
--> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:31:11
|
LL | fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
| ^^
note: but the referenced data is only valid for the lifetime 'y as defined on the function body at 31:15
--> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:31:15
|
LL | fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0491`.