]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / associated-types-project-from-hrtb-in-fn-body.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:29
3    |
4 LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>(
5    |        --  -- lifetime `'b` defined here
6    |        |
7    |        lifetime `'a` defined here
8 ...
9 LL |     let z: I::A = if cond { x } else { y };
10    |                             ^ assignment requires that `'a` must outlive `'b`
11    |
12    = help: consider adding the following bound: `'a: 'b`
13
14 error: lifetime may not live long enough
15   --> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:40
16    |
17 LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>(
18    |        --  -- lifetime `'b` defined here
19    |        |
20    |        lifetime `'a` defined here
21 ...
22 LL |     let z: I::A = if cond { x } else { y };
23    |                                        ^ assignment requires that `'b` must outlive `'a`
24    |
25    = help: consider adding the following bound: `'b: 'a`
26
27 help: `'a` and `'b` must be the same: replace one with the other
28
29 error: aborting due to 2 previous errors
30