]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-subtyping-1.stderr
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
[rust.git] / src / test / ui / associated-types / associated-types-subtyping-1.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/associated-types-subtyping-1.rs:26:38
3    |
4 LL | fn method2<'a,'b,T>(x: &'a T, y: &'b T)
5    |                        -----     ----- these two types are declared with different lifetimes...
6 ...
7 LL |     let _c: <T as Trait<'b>>::Type = a;
8    |                                      ^ ...but data from `y` flows into `x` here
9
10 error[E0623]: lifetime mismatch
11   --> $DIR/associated-types-subtyping-1.rs:35:38
12    |
13 LL | fn method3<'a,'b,T>(x: &'a T, y: &'b T)
14    |                        -----     ----- these two types are declared with different lifetimes...
15 ...
16 LL |     let _c: <T as Trait<'a>>::Type = b;
17    |                                      ^ ...but data from `y` flows into `x` here
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0623`.