]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr
rustc: use DefId instead of CodeExtent for FreeRegion's scope.
[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 function body at 15:0...
10   --> $DIR/ex2b-push-no-existing-names.rs:15:1
11    |
12 15 | / fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) {
13 16 | |     x.push(y);
14 17 | | }
15    | |_^
16 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 15:0
17   --> $DIR/ex2b-push-no-existing-names.rs:15:1
18    |
19 15 | / fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) {
20 16 | |     x.push(y);
21 17 | | }
22    | |_^
23
24 error: aborting due to previous error
25