FileCheck unwrap_unchecked

This commit is contained in:
Ryan Mehri 2023-10-20 22:22:32 -07:00
parent 3faf05b6e7
commit 6ab66c3f37

View File

@ -1,4 +1,3 @@
// skip-filecheck
#![crate_type = "lib"]
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
@ -8,5 +7,7 @@
// EMIT_MIR unwrap_unchecked.unwrap_unchecked.Inline.diff
// EMIT_MIR unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir
pub unsafe fn unwrap_unchecked<T>(slf: Option<T>) -> T {
// CHECK-LABEL: fn unwrap_unchecked(
// CHECK: (inlined #[track_caller] Option::<T>::unwrap_unchecked)
slf.unwrap_unchecked()
}