Skip to content

Commit

Permalink
FileCheck unwrap_unchecked
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehri01 committed Oct 21, 2023
1 parent 1fa2601 commit f474cf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/mir-opt/inline/unwrap_unchecked.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// skip-filecheck
#![crate_type = "lib"]

// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
Expand All @@ -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()
}

0 comments on commit f474cf4

Please sign in to comment.