rust/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed

10 lines
370 B
Rust
Raw Normal View History

// run-rustfix
2022-04-01 12:13:25 -05:00
pub fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime may not live long enough
2022-04-01 12:13:25 -05:00
pub fn foo2<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime may not live long enough
2022-04-01 12:13:25 -05:00
pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime may not live long enough
fn main() {}