@@ -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 --
0 commit comments