1 error: lifetime may not live long enough
2 --> $DIR/issue-90170-elision-mismatch.rs:3:40
4 LL | pub fn foo(x: &mut Vec<&u8>, y: &u8) { x.push(y); }
5 | - - ^^^^^^^^^ argument requires that `'1` must outlive `'2`
7 | | let's call the lifetime of this reference `'1`
8 | let's call the lifetime of this reference `'2`
10 help: consider introducing a named lifetime parameter
12 LL | pub fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); }
15 error: lifetime may not live long enough
16 --> $DIR/issue-90170-elision-mismatch.rs:5:44
18 LL | pub fn foo2(x: &mut Vec<&'_ u8>, y: &u8) { x.push(y); }
19 | - - ^^^^^^^^^ argument requires that `'1` must outlive `'2`
21 | | let's call the lifetime of this reference `'1`
22 | let's call the lifetime of this reference `'2`
24 help: consider introducing a named lifetime parameter
26 LL | pub fn foo2<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); }
29 error: lifetime may not live long enough
30 --> $DIR/issue-90170-elision-mismatch.rs:7:63
32 LL | pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&u8>, y: &u8) { x.push(y); }
33 | - - ^^^^^^^^^ argument requires that `'1` must outlive `'2`
35 | | let's call the lifetime of this reference `'1`
36 | let's call the lifetime of this reference `'2`
38 help: consider introducing a named lifetime parameter
40 LL | pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); }
43 error: aborting due to 3 previous errors