fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error[E0594]: cannot assign to `x`, as it is not declared as mutable 2 --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:19:46 3 | 4LL | pub fn e(x: &'static mut isize) { 5 | - help: consider changing this to be mutable: `mut x` 6LL | static mut Y: isize = 3; 7LL | let mut c1 = |y: &'static mut isize| x = y; 8 | ^^^^^ cannot assign 9 10error[E0594]: cannot assign to `x`, as it is not declared as mutable 11 --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:30:50 12 | 13LL | pub fn ee(x: &'static mut isize) { 14 | - help: consider changing this to be mutable: `mut x` 15... 16LL | let mut c2 = |y: &'static mut isize| x = y; 17 | ^^^^^ cannot assign 18 19error[E0594]: cannot assign to `x`, as it is not declared as mutable 20 --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:42:14 21 | 22LL | pub fn capture_assign_whole(x: (i32,)) { 23 | - help: consider changing this to be mutable: `mut x` 24LL | || { x = (1,); }; 25 | ^^^^^^^^ cannot assign 26 27error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable 28 --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:47:14 29 | 30LL | pub fn capture_assign_part(x: (i32,)) { 31 | - help: consider changing this to be mutable: `mut x` 32LL | || { x.0 = 1; }; 33 | ^^^^^^^ cannot assign 34 35error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable 36 --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:52:14 37 | 38LL | pub fn capture_reborrow_whole(x: (i32,)) { 39 | - help: consider changing this to be mutable: `mut x` 40LL | || { &mut x; }; 41 | ^^^^^^ cannot borrow as mutable 42 43error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable 44 --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:57:14 45 | 46LL | pub fn capture_reborrow_part(x: (i32,)) { 47 | - help: consider changing this to be mutable: `mut x` 48LL | || { &mut x.0; }; 49 | ^^^^^^^^ cannot borrow as mutable 50 51error: aborting due to 6 previous errors 52 53Some errors have detailed explanations: E0594, E0596. 54For more information about an error, try `rustc --explain E0594`.