error[E0623]: lifetime mismatch --> $DIR/issue-90170-elision-mismatch.rs:8:47 | LL | pub fn foo(x: &mut Vec<&u8>, y: &u8) { x.push(y); } | --- --- ^ ...but data from `y` flows into `x` here | | | these two types are declared with different lifetimes... | = note: each elided lifetime in input position becomes a distinct lifetime help: consider introducing a named lifetime parameter | LL | pub fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } | ++++ ++ ++ error[E0623]: lifetime mismatch --> $DIR/issue-90170-elision-mismatch.rs:10:51 | LL | pub fn foo2(x: &mut Vec<&'_ u8>, y: &u8) { x.push(y); } | ------ --- ^ ...but data from `y` flows into `x` here | | | these two types are declared with different lifetimes... | = note: each elided lifetime in input position becomes a distinct lifetime help: consider introducing a named lifetime parameter | LL | pub fn foo2<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } | ++++ ~~ ++ error[E0623]: lifetime mismatch --> $DIR/issue-90170-elision-mismatch.rs:12:70 | LL | pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&u8>, y: &u8) { x.push(y); } | --- --- ^ ...but data from `y` flows into `x` here | | | these two types are declared with different lifetimes... | = note: each elided lifetime in input position becomes a distinct lifetime help: consider introducing a named lifetime parameter | LL | pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } | ++ ++ error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0623`.