@@ -43,7 +43,7 @@ pub type ConstEvalResult<'tcx> = Result<ty::Const<'tcx>, ErrorHandled>;
4343#[ derive( Clone , Debug , RustcEncodable , RustcDecodable ) ]
4444pub struct ConstEvalErr < ' tcx > {
4545 pub span : Span ,
46- pub error : crate :: mir:: interpret:: EvalErrorKind < ' tcx , u64 > ,
46+ pub error : crate :: mir:: interpret:: InterpError < ' tcx , u64 > ,
4747 pub stacktrace : Vec < FrameInfo < ' tcx > > ,
4848}
4949
@@ -135,10 +135,10 @@ impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
135135 lint_root : Option < hir:: HirId > ,
136136 ) -> Result < DiagnosticBuilder < ' tcx > , ErrorHandled > {
137137 match self . error {
138- EvalErrorKind :: Layout ( LayoutError :: Unknown ( _) ) |
139- EvalErrorKind :: TooGeneric => return Err ( ErrorHandled :: TooGeneric ) ,
140- EvalErrorKind :: Layout ( LayoutError :: SizeOverflow ( _) ) |
141- EvalErrorKind :: TypeckError => return Err ( ErrorHandled :: Reported ) ,
138+ InterpError :: Layout ( LayoutError :: Unknown ( _) ) |
139+ InterpError :: TooGeneric => return Err ( ErrorHandled :: TooGeneric ) ,
140+ InterpError :: Layout ( LayoutError :: SizeOverflow ( _) ) |
141+ InterpError :: TypeckError => return Err ( ErrorHandled :: Reported ) ,
142142 _ => { } ,
143143 }
144144 trace ! ( "reporting const eval failure at {:?}" , self . span) ;
@@ -180,7 +180,7 @@ pub fn struct_error<'a, 'gcx, 'tcx>(
180180
181181#[ derive( Debug , Clone ) ]
182182pub struct EvalError < ' tcx > {
183- pub kind : EvalErrorKind < ' tcx , u64 > ,
183+ pub kind : InterpError < ' tcx , u64 > ,
184184 pub backtrace : Option < Box < Backtrace > > ,
185185}
186186
@@ -197,8 +197,8 @@ fn print_backtrace(backtrace: &mut Backtrace) {
197197 eprintln ! ( "\n \n An error occurred in miri:\n {:?}" , backtrace) ;
198198}
199199
200- impl < ' tcx > From < EvalErrorKind < ' tcx , u64 > > for EvalError < ' tcx > {
201- fn from ( kind : EvalErrorKind < ' tcx , u64 > ) -> Self {
200+ impl < ' tcx > From < InterpError < ' tcx , u64 > > for EvalError < ' tcx > {
201+ fn from ( kind : InterpError < ' tcx , u64 > ) -> Self {
202202 let backtrace = match env:: var ( "RUST_CTFE_BACKTRACE" ) {
203203 // matching RUST_BACKTRACE, we treat "0" the same as "not present".
204204 Ok ( ref val) if val != "0" => {
@@ -221,10 +221,10 @@ impl<'tcx> From<EvalErrorKind<'tcx, u64>> for EvalError<'tcx> {
221221 }
222222}
223223
224- pub type AssertMessage < ' tcx > = EvalErrorKind < ' tcx , mir:: Operand < ' tcx > > ;
224+ pub type AssertMessage < ' tcx > = InterpError < ' tcx , mir:: Operand < ' tcx > > ;
225225
226226#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
227- pub enum EvalErrorKind < ' tcx , O > {
227+ pub enum InterpError < ' tcx , O > {
228228 /// This variant is used by machines to signal their own errors that do not
229229 /// match an existing variant.
230230 MachineError ( String ) ,
@@ -312,9 +312,9 @@ pub enum EvalErrorKind<'tcx, O> {
312312
313313pub type EvalResult < ' tcx , T = ( ) > = Result < T , EvalError < ' tcx > > ;
314314
315- impl < ' tcx , O > EvalErrorKind < ' tcx , O > {
315+ impl < ' tcx , O > InterpError < ' tcx , O > {
316316 pub fn description ( & self ) -> & str {
317- use self :: EvalErrorKind :: * ;
317+ use self :: InterpError :: * ;
318318 match * self {
319319 MachineError ( ref inner) => inner,
320320 FunctionAbiMismatch ( ..) | FunctionArgMismatch ( ..) | FunctionRetMismatch ( ..)
@@ -450,15 +450,15 @@ impl<'tcx> fmt::Display for EvalError<'tcx> {
450450 }
451451}
452452
453- impl < ' tcx > fmt:: Display for EvalErrorKind < ' tcx , u64 > {
453+ impl < ' tcx > fmt:: Display for InterpError < ' tcx , u64 > {
454454 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
455455 write ! ( f, "{:?}" , self )
456456 }
457457}
458458
459- impl < ' tcx , O : fmt:: Debug > fmt:: Debug for EvalErrorKind < ' tcx , O > {
459+ impl < ' tcx , O : fmt:: Debug > fmt:: Debug for InterpError < ' tcx , O > {
460460 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
461- use self :: EvalErrorKind :: * ;
461+ use self :: InterpError :: * ;
462462 match * self {
463463 PointerOutOfBounds { ptr, check, allocation_size } => {
464464 write ! ( f, "Pointer must be in-bounds{} at offset {}, but is outside bounds of \
0 commit comments