Closed
Description
fn foo(x: fn(&u8, &u8), y: Vec<&u8>, z: &u8) {
y.push(z);
}
fn main(){}
gives
2 | fn foo(x: fn(&u8, &u8), y: Vec<&u8>, z: &u8) {
| --- --- these references are not declared with the same lifetime...
3 | y.push(z);
| ^ ...but data from `z` flows into `y` here
but should be giving
2 | fn foo(x: fn(&u8, &u8), y: Vec<&u8>, z: &u8) {
| --- --- these references are not declared with the same lifetime...
3 | y.push(z); // index will be zero or one
| ^ ...but data from `z` flows into `y` here