fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0502]: cannot borrow `heap` as immutable because it is also borrowed as mutable 2 --> $DIR/issue-47646.rs:9:30 3 | 4LL | let borrow = heap.peek_mut(); 5 | ---- mutable borrow occurs here 6LL | 7LL | match (borrow, ()) { 8 | ------------ a temporary with access to the mutable borrow is created here ... 9LL | (Some(_), ()) => { 10LL | println!("{:?}", heap); 11 | ^^^^ immutable borrow occurs here 12... 13LL | }; 14 | - ... and the mutable borrow might be used here, when that temporary is dropped and runs the destructor for type `(std::option::Option<std::collections::binary_heap::PeekMut<'_, i32>>, ())` 15 16error: aborting due to previous error 17 18For more information about this error, try `rustc --explain E0502`.