1 // Regression test of #85581.
2 // Checks not to suggest to add `;` when the second mutable borrow
3 // is in the first's scope.
5 use std::collections::BinaryHeap;
7 fn foo(heap: &mut BinaryHeap<i32>) {
8 match heap.peek_mut() {
9 Some(_) => { heap.pop(); },
10 //~^ ERROR: cannot borrow `*heap` as mutable more than once at a time