error[E0308]: mismatched types --> $DIR/ex2a-push-one-existing-name.rs:16:12 | 16 | x.push(y); | ^ lifetime mismatch | = note: expected type `Ref<'a, _>` found type `Ref<'_, _>` note: the anonymous lifetime #2 defined on the body at 15:51... --> $DIR/ex2a-push-one-existing-name.rs:15:52 | 15 | fn foo<'a>(x: &mut Vec>, y: Ref) { | ____________________________________________________^ starting here... 16 | | x.push(y); 17 | | } | |_^ ...ending here note: ...does not necessarily outlive the lifetime 'a as defined on the body at 15:51 --> $DIR/ex2a-push-one-existing-name.rs:15:52 | 15 | fn foo<'a>(x: &mut Vec>, y: Ref) { | ____________________________________________________^ starting here... 16 | | x.push(y); 17 | | } | |_^ ...ending here error: aborting due to previous error