error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements --> $DIR/ex2d-push-inference-variable-2.rs:17:13 | 17 | let b = Ref { data: y.data }; | ^^^ | note: first, the lifetime cannot outlive the lifetime 'c as defined on the function body at 15:0... --> $DIR/ex2d-push-inference-variable-2.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { 16 | | let a: &mut Vec> = x; 17 | | let b = Ref { data: y.data }; 18 | | a.push(b); 19 | | } | |_^ note: ...so that reference does not outlive borrowed content --> $DIR/ex2d-push-inference-variable-2.rs:17:25 | 17 | let b = Ref { data: y.data }; | ^^^^^^ note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 15:0... --> $DIR/ex2d-push-inference-variable-2.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { 16 | | let a: &mut Vec> = x; 17 | | let b = Ref { data: y.data }; 18 | | a.push(b); 19 | | } | |_^ note: ...so that expression is assignable (expected &mut std::vec::Vec>, found &mut std::vec::Vec>) --> $DIR/ex2d-push-inference-variable-2.rs:16:33 | 16 | let a: &mut Vec> = x; | ^ error: aborting due to previous error