error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:21:22 | LL | let mut c1 = |y: &'static mut isize| x = y; | ^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow mutably help: consider removing the `&mut`, as it is an immutable binding to a mutable reference | LL | x | error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:32:22 | LL | let mut c1 = |z: &'static mut isize| { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow mutably help: consider removing the `&mut`, as it is an immutable binding to a mutable reference | LL | x | error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:46:9 | LL | pub fn capture_assign_whole(x: (i32,)) { | - help: make this binding mutable: `mut x` LL | || { x = (1,); }; | ^^ cannot borrow mutably error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:52:9 | LL | pub fn capture_assign_part(x: (i32,)) { | - help: make this binding mutable: `mut x` LL | || { x.0 = 1; }; | ^^ cannot borrow mutably error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:58:9 | LL | pub fn capture_reborrow_whole(x: (i32,)) { | - help: make this binding mutable: `mut x` LL | || { &mut x; }; | ^^ cannot borrow mutably error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:64:9 | LL | pub fn capture_reborrow_part(x: (i32,)) { | - help: make this binding mutable: `mut x` LL | || { &mut x.0; }; | ^^ cannot borrow mutably error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0595`.