]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / associated-types-subtyping-1.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/associated-types-subtyping-1.rs:24:12
3    |
4 LL | fn method2<'a,'b,T>(x: &'a T, y: &'b T)
5    |            -- -- lifetime `'b` defined here
6    |            |
7    |            lifetime `'a` defined here
8 ...
9 LL |     let a: <T as Trait<'a>>::Type = make_any();
10    |            ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a`
11    |
12    = help: consider adding the following bound: `'b: 'a`
13
14 error: lifetime may not live long enough
15   --> $DIR/associated-types-subtyping-1.rs:35:13
16    |
17 LL | fn method3<'a,'b,T>(x: &'a T, y: &'b T)
18    |            -- -- lifetime `'b` defined here
19    |            |
20    |            lifetime `'a` defined here
21 ...
22 LL |     let _c: <T as Trait<'a>>::Type = b;
23    |             ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a`
24    |
25    = help: consider adding the following bound: `'b: 'a`
26
27 error: aborting due to 2 previous errors
28