Skip to content

Commit 07e1043

Browse files
authored
Rollup merge of #70286 - RalfJung:no-experiments, r=petrochenkov
Miri error type: remove UbExperimental variant In rust-lang/miri#1250, I will move Miri away from that variant, and use a custom `MachineStop` exception instead.
2 parents bb85308 + 29df39b commit 07e1043

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/librustc/mir/interpret/error.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ impl fmt::Debug for InvalidProgramInfo<'_> {
319319
pub enum UndefinedBehaviorInfo {
320320
/// Free-form case. Only for errors that are never caught!
321321
Ub(String),
322-
/// Free-form case for experimental UB. Only for errors that are never caught!
323-
UbExperimental(String),
324322
/// Unreachable code was executed.
325323
Unreachable,
326324
/// An enum discriminant was set to a value which was outside the range of valid values.
@@ -381,7 +379,7 @@ impl fmt::Debug for UndefinedBehaviorInfo {
381379
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
382380
use UndefinedBehaviorInfo::*;
383381
match self {
384-
Ub(msg) | UbExperimental(msg) => write!(f, "{}", msg),
382+
Ub(msg) => write!(f, "{}", msg),
385383
Unreachable => write!(f, "entering unreachable code"),
386384
InvalidDiscriminant(val) => write!(f, "encountering invalid enum discriminant {}", val),
387385
BoundsCheckFailed { ref len, ref index } => write!(
@@ -563,8 +561,7 @@ impl InterpError<'_> {
563561
InterpError::MachineStop(_)
564562
| InterpError::Unsupported(UnsupportedOpInfo::Unsupported(_))
565563
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::ValidationFailure(_))
566-
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_))
567-
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::UbExperimental(_)) => true,
564+
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_)) => true,
568565
_ => false,
569566
}
570567
}

0 commit comments

Comments
 (0)