]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error: lifetime may not live long enough |
2 | --> $DIR/ex3-both-anon-regions-using-fn-items.rs:2:3 | |
3 | | | |
4 | LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { | |
5 | | - - let's call the lifetime of this reference `'1` | |
6 | | | | |
7 | | let's call the lifetime of this reference `'2` | |
8 | LL | y.push(z); | |
9 | | ^^^^^^^^^ argument requires that `'1` must outlive `'2` | |
10 | ||
c295e0f8 XL |
11 | error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable |
12 | --> $DIR/ex3-both-anon-regions-using-fn-items.rs:2:3 | |
13 | | | |
14 | LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { | |
15 | | - help: consider changing this to be mutable: `mut y` | |
16 | LL | y.push(z); | |
17 | | ^^^^^^^^^ cannot borrow as mutable | |
18 | ||
48663c56 XL |
19 | error: aborting due to 2 previous errors |
20 | ||
21 | For more information about this error, try `rustc --explain E0596`. |