@@ -322,6 +322,9 @@ impl<O: fmt::Debug> fmt::Debug for PanicInfo<O> {
322
322
}
323
323
}
324
324
325
+ /// Error information for when the program we executed turned out not to actually be a valid
326
+ /// program. This cannot happen in stand-alone Miri, but it can happen during CTFE/ConstProp
327
+ /// where we work on generic code or execution does not have all information available.
325
328
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
326
329
pub enum InvalidProgramInfo < ' tcx > {
327
330
/// Resolution can fail if we are in a too generic context.
@@ -351,6 +354,7 @@ impl fmt::Debug for InvalidProgramInfo<'tcx> {
351
354
}
352
355
}
353
356
357
+ /// Error information for when the program caused Undefined Behavior.
354
358
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
355
359
pub enum UndefinedBehaviorInfo {
356
360
/// Free-form case. Only for errors that are never caught!
@@ -373,12 +377,19 @@ impl fmt::Debug for UndefinedBehaviorInfo {
373
377
}
374
378
}
375
379
380
+ /// Error information for when the program did something that might (or might not) be correct
381
+ /// to do according to the Rust spec, but due to limitations in the interpreter, the
382
+ /// operation could not be carried out. These limitations can differ between CTFE and the
383
+ /// Miri engine, e.g., CTFE does not support casting pointers to "real" integers.
384
+ ///
385
+ /// Currently, we also use this as fall-back error kind for errors that have not been
386
+ /// categorized yet.
376
387
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
377
388
pub enum UnsupportedOpInfo < ' tcx > {
378
389
/// Free-form case. Only for errors that are never caught!
379
390
Unsupported ( String ) ,
380
391
381
- // -- Everything below is not classified yet --
392
+ // -- Everything below is not categorized yet --
382
393
FunctionAbiMismatch ( Abi , Abi ) ,
383
394
FunctionArgMismatch ( Ty < ' tcx > , Ty < ' tcx > ) ,
384
395
FunctionRetMismatch ( Ty < ' tcx > , Ty < ' tcx > ) ,
@@ -545,6 +556,8 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> {
545
556
}
546
557
}
547
558
559
+ /// Error information for when the program exhausted the resources granted to it
560
+ /// by the interpreter.
548
561
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
549
562
pub enum ResourceExhaustionInfo {
550
563
/// The stack grew too big.
0 commit comments