1 error: lifetime may not live long enough
2 --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:3
4 LL | fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
5 | - - let's call the lifetime of this reference `'1`
7 | let's call the lifetime of this reference `'2`
9 | ^^^^^^^^^ argument requires that `'1` must outlive `'2`
11 help: consider introducing a named lifetime parameter
13 LL | fn foo<'a>(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&'a u8>, z: &'a u8) {
16 error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable
17 --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:3
19 LL | fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
20 | - help: consider changing this to be mutable: `mut y`
22 | ^^^^^^^^^ cannot borrow as mutable
24 error: aborting due to 2 previous errors
26 For more information about this error, try `rustc --explain E0596`.