]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / regions / regions-implied-bounds-projection-gap-hr-1.stderr
1 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
2   --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:1
3    |
4 LL | / fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
5 LL | |     //~^ ERROR reference has a longer lifetime than the data it references
6 LL | | {
7 LL | | }
8    | |_^
9    |
10 note: the pointer is valid for the lifetime 'x as defined on the function body at 21:11
11   --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:11
12    |
13 LL | fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
14    |           ^^
15 note: but the referenced data is only valid for the lifetime 'y as defined on the function body at 21:15
16   --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:15
17    |
18 LL | fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
19    |               ^^
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0491`.