@@ -342,8 +342,10 @@ impl fmt::Debug for InvalidProgramInfo<'tcx> {
342342
343343#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
344344pub 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!
346346 Ub ( String ) ,
347+ /// Free-form case for experimental UB. Only for errors that are never caught!
348+ UbExperimental ( String ) ,
347349 /// Unreachable code was executed.
348350 Unreachable ,
349351}
@@ -352,7 +354,7 @@ impl fmt::Debug for UndefinedBehaviorInfo {
352354 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
353355 use UndefinedBehaviorInfo :: * ;
354356 match self {
355- Ub ( ref msg) =>
357+ Ub ( msg ) | UbExperimental ( msg) =>
356358 write ! ( f, "{}" , msg) ,
357359 Unreachable =>
358360 write ! ( f, "entered unreachable code" ) ,
@@ -362,7 +364,7 @@ impl fmt::Debug for UndefinedBehaviorInfo {
362364
363365#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
364366pub 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!
366368 Unsupported ( String ) ,
367369
368370 // -- Everything below is not classified yet --
@@ -406,7 +408,6 @@ pub enum UnsupportedOpInfo<'tcx> {
406408 VtableForArgumentlessMethod ,
407409 ModifiedConstantMemory ,
408410 ModifiedStatic ,
409- AssumptionNotHeld ,
410411 TypeNotPrimitive ( Ty < ' tcx > ) ,
411412 ReallocatedWrongMemoryKind ( String , String ) ,
412413 DeallocatedWrongMemoryKind ( String , String ) ,
@@ -505,8 +506,6 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> {
505506 ModifiedStatic =>
506507 write ! ( f, "tried to modify a static's initial value from another static's \
507508 initializer") ,
508- AssumptionNotHeld =>
509- write ! ( f, "`assume` argument was false" ) ,
510509 ReallocateNonBasePtr =>
511510 write ! ( f, "tried to reallocate with a pointer not to the beginning of an \
512511 existing object") ,
0 commit comments