about summary refs log tree commit diff
path: root/tests/codegen-llvm/binary-heap-peek-mut-pop-no-panic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen-llvm/binary-heap-peek-mut-pop-no-panic.rs')
-rw-r--r--tests/codegen-llvm/binary-heap-peek-mut-pop-no-panic.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/codegen-llvm/binary-heap-peek-mut-pop-no-panic.rs b/tests/codegen-llvm/binary-heap-peek-mut-pop-no-panic.rs
new file mode 100644
index 00000000000..2c40327f624
--- /dev/null
+++ b/tests/codegen-llvm/binary-heap-peek-mut-pop-no-panic.rs
@@ -0,0 +1,13 @@
+//@ compile-flags: -Copt-level=3
+//@ 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)
+}