rust/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.rs

7 lines
116 B
Rust
Raw Normal View History

fn foo(x: &mut Vec<&u8>, y: &u8) {
2022-05-22 01:05:15 -05:00
x.push(y);
2022-04-01 12:13:25 -05:00
//~^ ERROR lifetime may not live long enough
}
fn main() { }