]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
[rust.git] / src / test / ui / lifetime-errors / ex2b-push-no-existing-names.stderr
1 error[E0308]: mismatched types
2   --> $DIR/ex2b-push-no-existing-names.rs:16:12
3    |
4 16 |     x.push(y);
5    |            ^ lifetime mismatch
6    |
7    = note: expected type `Ref<'_, _>`
8               found type `Ref<'_, _>`
9 note: the anonymous lifetime #3 defined on the body at 15:43...
10   --> $DIR/ex2b-push-no-existing-names.rs:15:44
11    |
12 15 |   fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) {
13    |  ____________________________________________^ starting here...
14 16 | |     x.push(y);
15 17 | | }
16    | |_^ ...ending here
17 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the body at 15:43
18   --> $DIR/ex2b-push-no-existing-names.rs:15:44
19    |
20 15 |   fn foo(x: &mut Vec<Ref<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