fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0506]: cannot assign to `x` because it is borrowed 2 --> $DIR/closure-use-spans.rs:5:5 3 | 4LL | let y = &x; 5 | -- `x` is borrowed here 6LL | x = 0; 7 | ^^^^^ `x` is assigned to here but it was already borrowed 8LL | || *y; 9 | -- borrow later captured here by closure 10 11error[E0506]: cannot assign to `x` because it is borrowed 12 --> $DIR/closure-use-spans.rs:11:5 13 | 14LL | let y = &mut x; 15 | ------ `x` is borrowed here 16LL | x = 0; 17 | ^^^^^ `x` is assigned to here but it was already borrowed 18LL | || *y = 1; 19 | -- borrow later captured here by closure 20 21error[E0506]: cannot assign to `x` because it is borrowed 22 --> $DIR/closure-use-spans.rs:17:5 23 | 24LL | let y = &x; 25 | -- `x` is borrowed here 26LL | x = 0; 27 | ^^^^^ `x` is assigned to here but it was already borrowed 28LL | move || *y; 29 | -- borrow later captured here by closure 30 31error: aborting due to 3 previous errors 32 33For more information about this error, try `rustc --explain E0506`.