@@ -313,6 +313,9 @@ impl<O: fmt::Debug> fmt::Debug for PanicInfo<O> {
313
313
}
314
314
}
315
315
316
+ /// Error information for when the program we executed turned out not to actually be a valid
317
+ /// program. This cannot happen in stand-alone Miri, but it can happen during CTFE/ConstProp
318
+ /// where we work on generic code or execution does not have all information available.
316
319
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
317
320
pub enum InvalidProgramInfo < ' tcx > {
318
321
/// Resolution can fail if we are in a too generic context.
@@ -342,6 +345,7 @@ impl fmt::Debug for InvalidProgramInfo<'tcx> {
342
345
}
343
346
}
344
347
348
+ /// Error information for when the program caused Undefined Behavior.
345
349
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
346
350
pub enum UndefinedBehaviorInfo {
347
351
/// Free-form case. Only for errors that are never caught!
@@ -364,12 +368,19 @@ impl fmt::Debug for UndefinedBehaviorInfo {
364
368
}
365
369
}
366
370
371
+ /// Error information for when the program did something that might (or might not) be correct
372
+ /// to do according to the Rust spec, but due to limitations in the interpreter, the
373
+ /// operation could not be carried out. These limitations can differ between CTFE and the
374
+ /// Miri engine, e.g., CTFE does not support casting pointers to "real" integers.
375
+ ///
376
+ /// Currently, we also use this as fall-back error kind for errors that have not been
377
+ /// categorized yet.
367
378
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
368
379
pub enum UnsupportedOpInfo < ' tcx > {
369
380
/// Free-form case. Only for errors that are never caught!
370
381
Unsupported ( String ) ,
371
382
372
- // -- Everything below is not classified yet --
383
+ // -- Everything below is not categorized yet --
373
384
FunctionAbiMismatch ( Abi , Abi ) ,
374
385
FunctionArgMismatch ( Ty < ' tcx > , Ty < ' tcx > ) ,
375
386
FunctionRetMismatch ( Ty < ' tcx > , Ty < ' tcx > ) ,
@@ -536,6 +547,8 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> {
536
547
}
537
548
}
538
549
550
+ /// Error information for when the program exhausted the resources granted to it
551
+ /// by the interpreter.
539
552
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
540
553
pub enum ResourceExhaustionInfo {
541
554
/// The stack grew too big.
0 commit comments