error[E0502]: cannot borrow `block_array` as mutable because it is also borrowed as immutable --> tests/ui/array/local_only/immutable_borrow.rs:8:28 | 7 | let block_slice = block_array.as_slice(); | ----------- immutable borrow occurs here 8 | let _mut_block_slice = block_array.as_mut_slice(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here 9 | let _task = async { 10 | println!("vec {:?}",block_slice); | ----------- immutable borrow later captured here by closure