]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-47646.rs
Rollup merge of #106896 - Ezrashaw:str-cast-bool-emptyness, r=compiler-errors
[rust.git] / tests / 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 }