]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / lifetimes / lifetime-errors / ex3-both-anon-regions-using-fn-items.nll.stderr
CommitLineData
48663c56
XL
1error: lifetime may not live long enough
2 --> $DIR/ex3-both-anon-regions-using-fn-items.rs:2:3
3 |
4LL | 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`
8LL | y.push(z);
9 | ^^^^^^^^^ argument requires that `'1` must outlive `'2`
10
c295e0f8
XL
11error[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 |
14LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) {
15 | - help: consider changing this to be mutable: `mut y`
16LL | y.push(z);
17 | ^^^^^^^^^ cannot borrow as mutable
18
48663c56
XL
19error: aborting due to 2 previous errors
20
21For more information about this error, try `rustc --explain E0596`.