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