diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 1ac46fff1b4e..2d84e919359e 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -1255,7 +1255,7 @@ impl<'tcx> Debug for Operand<'tcx> { Constant(ref a) => write!(fmt, "{a:?}"), Copy(ref place) => write!(fmt, "copy {place:?}"), Move(ref place) => write!(fmt, "move {place:?}"), - RuntimeChecks(checks) => write!(fmt, "const {checks:?}"), + RuntimeChecks(checks) => write!(fmt, "{checks:?}"), } } } diff --git a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff index ae2b8e574303..2aa92fd34ebf 100644 --- a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff +++ b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff @@ -94,7 +94,7 @@ StorageLive(_21); StorageLive(_22); StorageLive(_23); - switchInt(const UbChecks) -> [0: bb6, otherwise: bb5]; + switchInt(UbChecks) -> [0: bb6, otherwise: bb5]; } bb1: { diff --git a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff index 164aeb2d9037..408ff60712e1 100644 --- a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff +++ b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff @@ -94,7 +94,7 @@ StorageLive(_21); StorageLive(_22); StorageLive(_23); - switchInt(const UbChecks) -> [0: bb6, otherwise: bb5]; + switchInt(UbChecks) -> [0: bb6, otherwise: bb5]; } bb1: { diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-abort.diff b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-abort.diff index 153e314fb6f4..d66223b91bc4 100644 --- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-abort.diff +++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-abort.diff @@ -22,7 +22,7 @@ _4 = copy _2; - _0 = core::num::::unchecked_shl(move _3, move _4) -> [return: bb1, unwind unreachable]; + StorageLive(_5); -+ switchInt(const UbChecks) -> [0: bb2, otherwise: bb1]; ++ switchInt(UbChecks) -> [0: bb2, otherwise: bb1]; } bb1: { diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-unwind.diff b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-unwind.diff index fd9f5838efc3..54907cf809b4 100644 --- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-unwind.diff +++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-unwind.diff @@ -22,7 +22,7 @@ _4 = copy _2; - _0 = core::num::::unchecked_shl(move _3, move _4) -> [return: bb1, unwind continue]; + StorageLive(_5); -+ switchInt(const UbChecks) -> [0: bb2, otherwise: bb1]; ++ switchInt(UbChecks) -> [0: bb2, otherwise: bb1]; } bb1: { diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-abort.diff b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-abort.diff index 5b12c1853359..c118f5b0df3f 100644 --- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-abort.diff +++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-abort.diff @@ -22,7 +22,7 @@ _4 = copy _2; - _0 = core::num::::unchecked_shr(move _3, move _4) -> [return: bb1, unwind unreachable]; + StorageLive(_5); -+ switchInt(const UbChecks) -> [0: bb2, otherwise: bb1]; ++ switchInt(UbChecks) -> [0: bb2, otherwise: bb1]; } bb1: { diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-unwind.diff b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-unwind.diff index e8474898b995..6a1e6a0a2d26 100644 --- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-unwind.diff +++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-unwind.diff @@ -22,7 +22,7 @@ _4 = copy _2; - _0 = core::num::::unchecked_shr(move _3, move _4) -> [return: bb1, unwind continue]; + StorageLive(_5); -+ switchInt(const UbChecks) -> [0: bb2, otherwise: bb1]; ++ switchInt(UbChecks) -> [0: bb2, otherwise: bb1]; } bb1: { diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff index 7bd93b804e7f..041dd27cb564 100644 --- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff +++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff @@ -33,7 +33,7 @@ + } + + bb2: { -+ assume(const UbChecks); ++ assume(UbChecks); + _4 = unreachable_unchecked::precondition_check() -> [return: bb1, unwind unreachable]; + } + diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff index ae194db56cc9..be89063a8ac9 100644 --- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff +++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff @@ -37,7 +37,7 @@ - bb2 (cleanup): { - resume; + bb2: { -+ assume(const UbChecks); ++ assume(UbChecks); + _4 = unreachable_unchecked::precondition_check() -> [return: bb1, unwind unreachable]; + } + diff --git a/tests/mir-opt/instsimplify/ub_check.unwrap_unchecked.InstSimplify-after-simplifycfg.diff b/tests/mir-opt/instsimplify/ub_check.unwrap_unchecked.InstSimplify-after-simplifycfg.diff index 890c87880441..c4fa526a7af9 100644 --- a/tests/mir-opt/instsimplify/ub_check.unwrap_unchecked.InstSimplify-after-simplifycfg.diff +++ b/tests/mir-opt/instsimplify/ub_check.unwrap_unchecked.InstSimplify-after-simplifycfg.diff @@ -32,7 +32,7 @@ } bb2: { -- assume(const UbChecks); +- assume(UbChecks); + assume(const false); _4 = unreachable_unchecked::precondition_check() -> [return: bb1, unwind unreachable]; }