Skip to content

Commit 18daa76

Browse files
committed
move AssumptionNotHeld to UB
1 parent 89a370d commit 18daa76

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc/mir/interpret/error.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ pub enum UndefinedBehaviorInfo {
348348
UbExperimental(String),
349349
/// Unreachable code was executed.
350350
Unreachable,
351+
/// An `assume` was run on a `false` condition,
352+
AssumptionNotHeld,
351353
}
352354

353355
impl fmt::Debug for UndefinedBehaviorInfo {
@@ -358,6 +360,8 @@ impl fmt::Debug for UndefinedBehaviorInfo {
358360
write!(f, "{}", msg),
359361
Unreachable =>
360362
write!(f, "entered unreachable code"),
363+
AssumptionNotHeld =>
364+
write!(f, "`assume` argument was false"),
361365
}
362366
}
363367
}
@@ -408,7 +412,6 @@ pub enum UnsupportedOpInfo<'tcx> {
408412
VtableForArgumentlessMethod,
409413
ModifiedConstantMemory,
410414
ModifiedStatic,
411-
AssumptionNotHeld,
412415
TypeNotPrimitive(Ty<'tcx>),
413416
ReallocatedWrongMemoryKind(String, String),
414417
DeallocatedWrongMemoryKind(String, String),
@@ -507,8 +510,6 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> {
507510
ModifiedStatic =>
508511
write!(f, "tried to modify a static's initial value from another static's \
509512
initializer"),
510-
AssumptionNotHeld =>
511-
write!(f, "`assume` argument was false"),
512513
ReallocateNonBasePtr =>
513514
write!(f, "tried to reallocate with a pointer not to the beginning of an \
514515
existing object"),

0 commit comments

Comments
 (0)