@@ -108,7 +108,7 @@ pub fn super_combine_tys<'a,'tcx:'a,R>(infcx: &InferCtxt<'a, 'tcx>,
108108 // All other cases of inference are errors
109109 ( & ty:: TyInfer ( _) , _) |
110110 ( _, & ty:: TyInfer ( _) ) => {
111- Err ( ty:: terr_sorts ( ty_relate:: expected_found ( relation, & a, & b) ) )
111+ Err ( ty:: Sorts ( ty_relate:: expected_found ( relation, & a, & b) ) )
112112 }
113113
114114
@@ -278,7 +278,7 @@ impl<'a, 'tcx> CombineFields<'a, 'tcx> {
278278 } ;
279279 let u = ty. fold_with ( & mut generalize) ;
280280 if generalize. cycle_detected {
281- Err ( ty:: terr_cyclic_ty )
281+ Err ( ty:: CyclicTy )
282282 } else {
283283 Ok ( u)
284284 }
@@ -363,12 +363,12 @@ impl<'cx, 'tcx> ty_fold::TypeFolder<'tcx> for Generalizer<'cx, 'tcx> {
363363
364364pub trait RelateResultCompare < ' tcx , T > {
365365 fn compare < F > ( & self , t : T , f : F ) -> RelateResult < ' tcx , T > where
366- F : FnOnce ( ) -> ty:: type_err < ' tcx > ;
366+ F : FnOnce ( ) -> ty:: TypeError < ' tcx > ;
367367}
368368
369369impl < ' tcx , T : Clone + PartialEq > RelateResultCompare < ' tcx , T > for RelateResult < ' tcx , T > {
370370 fn compare < F > ( & self , t : T , f : F ) -> RelateResult < ' tcx , T > where
371- F : FnOnce ( ) -> ty:: type_err < ' tcx > ,
371+ F : FnOnce ( ) -> ty:: TypeError < ' tcx > ,
372372 {
373373 self . clone ( ) . and_then ( |s| {
374374 if s == t {
@@ -381,16 +381,16 @@ impl<'tcx, T:Clone + PartialEq> RelateResultCompare<'tcx, T> for RelateResult<'t
381381}
382382
383383fn int_unification_error < ' tcx > ( a_is_expected : bool , v : ( ty:: IntVarValue , ty:: IntVarValue ) )
384- -> ty:: type_err < ' tcx >
384+ -> ty:: TypeError < ' tcx >
385385{
386386 let ( a, b) = v;
387- ty:: terr_int_mismatch ( ty_relate:: expected_found_bool ( a_is_expected, & a, & b) )
387+ ty:: IntMismatch ( ty_relate:: expected_found_bool ( a_is_expected, & a, & b) )
388388}
389389
390390fn float_unification_error < ' tcx > ( a_is_expected : bool ,
391391 v : ( ast:: FloatTy , ast:: FloatTy ) )
392- -> ty:: type_err < ' tcx >
392+ -> ty:: TypeError < ' tcx >
393393{
394394 let ( a, b) = v;
395- ty:: terr_float_mismatch ( ty_relate:: expected_found_bool ( a_is_expected, & a, & b) )
395+ ty:: FloatMismatch ( ty_relate:: expected_found_bool ( a_is_expected, & a, & b) )
396396}
0 commit comments