@@ -342,8 +342,10 @@ impl fmt::Debug for InvalidProgramInfo<'tcx> {
342
342
343
343
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
344
344
pub enum UndefinedBehaviorInfo {
345
- /// Handle cases which for which we do not have a fixed variant.
345
+ /// Free-form case. Only for errors that are never caught!
346
346
Ub ( String ) ,
347
+ /// Free-form case for experimental UB. Only for errors that are never caught!
348
+ UbExperimental ( String ) ,
347
349
/// Unreachable code was executed.
348
350
Unreachable ,
349
351
}
@@ -352,7 +354,7 @@ impl fmt::Debug for UndefinedBehaviorInfo {
352
354
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
353
355
use UndefinedBehaviorInfo :: * ;
354
356
match self {
355
- Ub ( ref msg) =>
357
+ Ub ( msg ) | UbExperimental ( msg) =>
356
358
write ! ( f, "{}" , msg) ,
357
359
Unreachable =>
358
360
write ! ( f, "entered unreachable code" ) ,
@@ -362,7 +364,7 @@ impl fmt::Debug for UndefinedBehaviorInfo {
362
364
363
365
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
364
366
pub enum UnsupportedOpInfo < ' tcx > {
365
- /// Handle cases which for which we do not have a fixed variant.
367
+ /// Free-form case. Only for errors that are never caught!
366
368
Unsupported ( String ) ,
367
369
368
370
// -- Everything below is not classified yet --
@@ -406,7 +408,6 @@ pub enum UnsupportedOpInfo<'tcx> {
406
408
VtableForArgumentlessMethod ,
407
409
ModifiedConstantMemory ,
408
410
ModifiedStatic ,
409
- AssumptionNotHeld ,
410
411
TypeNotPrimitive ( Ty < ' tcx > ) ,
411
412
ReallocatedWrongMemoryKind ( String , String ) ,
412
413
DeallocatedWrongMemoryKind ( String , String ) ,
@@ -505,8 +506,6 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> {
505
506
ModifiedStatic =>
506
507
write ! ( f, "tried to modify a static's initial value from another static's \
507
508
initializer") ,
508
- AssumptionNotHeld =>
509
- write ! ( f, "`assume` argument was false" ) ,
510
509
ReallocateNonBasePtr =>
511
510
write ! ( f, "tried to reallocate with a pointer not to the beginning of an \
512
511
existing object") ,
0 commit comments