]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-47646.rs
Rollup merge of #60895 - chandde:master, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-47646.rs
1 use std::collections::BinaryHeap;
2
3 fn main() {
4     let mut heap: BinaryHeap<i32> = BinaryHeap::new();
5     let borrow = heap.peek_mut();
6
7     match (borrow, ()) {
8         (Some(_), ()) => {
9             println!("{:?}", heap); //~ ERROR cannot borrow `heap` as immutable
10         }
11         _ => {}
12     };
13 }