]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr
Fix invalid associated type rendering in rustdoc
[rust.git] / src / test / ui / lifetime-errors / ex2a-push-one-existing-name.stderr
1 error[E0308]: mismatched types
2   --> $DIR/ex2a-push-one-existing-name.rs:16:12
3    |
4 16 |     x.push(y);
5    |            ^ lifetime mismatch
6    |
7    = note: expected type `Ref<'a, i32>`
8               found type `Ref<'_, i32>`
9 note: the anonymous lifetime #2 defined on the body at 15:51...
10   --> $DIR/ex2a-push-one-existing-name.rs:15:52
11    |
12 15 |   fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) {
13    |  ____________________________________________________^ starting here...
14 16 | |     x.push(y);
15 17 | | }
16    | |_^ ...ending here
17 note: ...does not necessarily outlive the lifetime 'a as defined on the body at 15:51
18   --> $DIR/ex2a-push-one-existing-name.rs:15:52
19    |
20 15 |   fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) {
21    |  ____________________________________________________^ starting here...
22 16 | |     x.push(y);
23 17 | | }
24    | |_^ ...ending here
25
26 error: aborting due to previous error
27