rust/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs
2023-01-11 09:32:08 +00:00

8 lines
160 B
Rust

fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
y.push(z);
//~^ ERROR lifetime may not live long enough
//~| ERROR cannot borrow
}
fn main() { }