fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error[E0506]: cannot assign to `x` because it is borrowed 2 --> $DIR/closure-use-spans.rs:5:5 3 | 4LL | let y = &x; 5 | -- borrow of `x` occurs here 6LL | x = 0; 7 | ^^^^^ assignment to borrowed `x` occurs here 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 | ------ borrow of `x` occurs here 16LL | x = 0; 17 | ^^^^^ assignment to borrowed `x` occurs here 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 | -- borrow of `x` occurs here 26LL | x = 0; 27 | ^^^^^ assignment to borrowed `x` occurs here 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`.