2021-11-02 20:22:41 +00:00
|
|
|
error[E0623]: lifetime mismatch
|
2022-05-22 06:05:15 +00:00
|
|
|
--> $DIR/issue-90170-elision-mismatch.rs:8:47
|
2021-11-02 20:22:41 +00:00
|
|
|
|
|
|
|
|
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
|
2022-05-22 06:05:15 +00:00
|
|
|
--> $DIR/issue-90170-elision-mismatch.rs:10:51
|
2021-11-02 20:22:41 +00:00
|
|
|
|
|
|
|
|
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
|
2022-05-22 06:05:15 +00:00
|
|
|
--> $DIR/issue-90170-elision-mismatch.rs:12:70
|
2021-11-02 20:22:41 +00:00
|
|
|
|
|
|
|
|
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`.
|