rust/tests/codegen/binary-heap-peek-mut-pop-no-panic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
304 B
Rust
Raw Permalink Normal View History

//@ compile-flags: -O
//@ ignore-std-debug-assertions
#![crate_type = "lib"]
use std::collections::binary_heap::PeekMut;
// CHECK-LABEL: @peek_mut_pop
#[no_mangle]
pub fn peek_mut_pop(peek_mut: PeekMut<u32>) -> u32 {
// CHECK-NOT: panic
// CHECK-NOT: unwrap_failed
PeekMut::pop(peek_mut)
}