@@ -304,7 +304,7 @@ impl fmt::Debug for InvalidProgramInfo<'_> {
304304}
305305
306306/// Error information for when the program caused Undefined Behavior.
307- pub enum UndefinedBehaviorInfo < ' tcx > {
307+ pub enum UndefinedBehaviorInfo {
308308 /// Free-form case. Only for errors that are never caught!
309309 Ub ( String ) ,
310310 /// Free-form case for experimental UB. Only for errors that are never caught!
@@ -322,10 +322,10 @@ pub enum UndefinedBehaviorInfo<'tcx> {
322322 /// Overflowing inbounds pointer arithmetic.
323323 PointerArithOverflow ,
324324 /// Invalid metadata in a wide pointer (using `str` to avoid allocations).
325- InvalidMeta ( & ' tcx str ) ,
325+ InvalidMeta ( & ' static str ) ,
326326}
327327
328- impl fmt:: Debug for UndefinedBehaviorInfo < ' _ > {
328+ impl fmt:: Debug for UndefinedBehaviorInfo {
329329 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
330330 use UndefinedBehaviorInfo :: * ;
331331 match self {
@@ -358,7 +358,7 @@ pub enum UnsupportedOpInfo<'tcx> {
358358
359359 /// When const-prop encounters a situation it does not support, it raises this error.
360360 /// This must not allocate for performance reasons (hence `str`, not `String`).
361- ConstPropUnsupported ( & ' tcx str ) ,
361+ ConstPropUnsupported ( & ' static str ) ,
362362
363363 // -- Everything below is not categorized yet --
364364 FunctionAbiMismatch ( Abi , Abi ) ,
@@ -580,7 +580,7 @@ impl fmt::Debug for ResourceExhaustionInfo {
580580
581581pub enum InterpError < ' tcx > {
582582 /// The program caused undefined behavior.
583- UndefinedBehavior ( UndefinedBehaviorInfo < ' tcx > ) ,
583+ UndefinedBehavior ( UndefinedBehaviorInfo ) ,
584584 /// The program did something the interpreter does not support (some of these *might* be UB
585585 /// but the interpreter is not sure).
586586 Unsupported ( UnsupportedOpInfo < ' tcx > ) ,
0 commit comments