]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-47646.rs
Auto merge of #57118 - Zoxc:query-stats, r=wesleywiser
[rust.git] / src / test / ui / issues / issue-47646.rs
1 #![allow(warnings)]
2 #![feature(nll)]
3
4 use std::collections::BinaryHeap;
5
6 fn main() {
7     let mut heap: BinaryHeap<i32> = BinaryHeap::new();
8     let borrow = heap.peek_mut();
9
10     match (borrow, ()) {
11         (Some(_), ()) => {
12             println!("{:?}", heap); //~ ERROR cannot borrow `heap` as immutable
13         }
14         _ => {}
15     };
16 }