mirror of https://github.com/rust-lang/rust
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
error: lifetime may not live long enough
|
|
--> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:29
|
|
|
|
|
LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>(
|
|
| -- -- lifetime `'b` defined here
|
|
| |
|
|
| lifetime `'a` defined here
|
|
...
|
|
LL | let z: I::A = if cond { x } else { y };
|
|
| ^ assignment requires that `'a` must outlive `'b`
|
|
|
|
|
= help: consider adding the following bound: `'a: 'b`
|
|
|
|
error: lifetime may not live long enough
|
|
--> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:40
|
|
|
|
|
LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>(
|
|
| -- -- lifetime `'b` defined here
|
|
| |
|
|
| lifetime `'a` defined here
|
|
...
|
|
LL | let z: I::A = if cond { x } else { y };
|
|
| ^ assignment requires that `'b` must outlive `'a`
|
|
|
|
|
= help: consider adding the following bound: `'b: 'a`
|
|
|
|
help: `'a` and `'b` must be the same: replace one with the other
|
|
|
|
error: aborting due to 2 previous errors
|
|
|