rust/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr
2017-11-24 11:32:35 +01:00

12 lines
472 B
Plaintext

error[E0623]: lifetime mismatch
--> $DIR/ex2c-push-inference-variable.rs:17:12
|
15 | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
| ------------ ------------ these two types are declared with different lifetimes...
16 | let z = Ref { data: y.data };
17 | x.push(z); //~ ERROR lifetime mismatch
| ^ ...but data from `y` flows into `x` here
error: aborting due to previous error