@@ -44,9 +44,8 @@ use super::type_variable::{RelationDir, BiTo, EqTo, SubtypeOf, SupertypeOf};
4444use middle:: ty:: { TyVar } ;
4545use middle:: ty:: { IntType , UintType } ;
4646use middle:: ty:: { self , Ty , TypeError } ;
47- use middle:: ty_fold;
48- use middle:: ty_fold:: { TypeFolder , TypeFoldable } ;
49- use middle:: ty_relate:: { self , Relate , RelateResult , TypeRelation } ;
47+ use middle:: ty:: fold:: { TypeFolder , TypeFoldable } ;
48+ use middle:: ty:: relate:: { Relate , RelateResult , TypeRelation } ;
5049
5150use syntax:: codemap:: Span ;
5251use rustc_front:: hir;
@@ -56,7 +55,7 @@ pub struct CombineFields<'a, 'tcx: 'a> {
5655 pub infcx : & ' a InferCtxt < ' a , ' tcx > ,
5756 pub a_is_expected : bool ,
5857 pub trace : TypeTrace < ' tcx > ,
59- pub cause : Option < ty_relate :: Cause > ,
58+ pub cause : Option < ty :: relate :: Cause > ,
6059}
6160
6261pub fn super_combine_tys < ' a , ' tcx : ' a , R > ( infcx : & InferCtxt < ' a , ' tcx > ,
@@ -108,12 +107,12 @@ pub fn super_combine_tys<'a,'tcx:'a,R>(infcx: &InferCtxt<'a, 'tcx>,
108107 // All other cases of inference are errors
109108 ( & ty:: TyInfer ( _) , _) |
110109 ( _, & ty:: TyInfer ( _) ) => {
111- Err ( TypeError :: Sorts ( ty_relate :: expected_found ( relation, & a, & b) ) )
110+ Err ( TypeError :: Sorts ( ty :: relate :: expected_found ( relation, & a, & b) ) )
112111 }
113112
114113
115114 _ => {
116- ty_relate :: super_relate_tys ( relation, a, b)
115+ ty :: relate :: super_relate_tys ( relation, a, b)
117116 }
118117 }
119118}
@@ -293,7 +292,7 @@ struct Generalizer<'cx, 'tcx:'cx> {
293292 cycle_detected : bool ,
294293}
295294
296- impl < ' cx , ' tcx > ty_fold :: TypeFolder < ' tcx > for Generalizer < ' cx , ' tcx > {
295+ impl < ' cx , ' tcx > ty :: fold :: TypeFolder < ' tcx > for Generalizer < ' cx , ' tcx > {
297296 fn tcx ( & self ) -> & ty:: ctxt < ' tcx > {
298297 self . infcx . tcx
299298 }
@@ -319,7 +318,7 @@ impl<'cx, 'tcx> ty_fold::TypeFolder<'tcx> for Generalizer<'cx, 'tcx> {
319318 }
320319 }
321320 _ => {
322- ty_fold :: super_fold_ty ( self , t)
321+ ty :: fold :: super_fold_ty ( self , t)
323322 }
324323 }
325324 }
@@ -384,13 +383,13 @@ fn int_unification_error<'tcx>(a_is_expected: bool, v: (ty::IntVarValue, ty::Int
384383 -> ty:: TypeError < ' tcx >
385384{
386385 let ( a, b) = v;
387- TypeError :: IntMismatch ( ty_relate :: expected_found_bool ( a_is_expected, & a, & b) )
386+ TypeError :: IntMismatch ( ty :: relate :: expected_found_bool ( a_is_expected, & a, & b) )
388387}
389388
390389fn float_unification_error < ' tcx > ( a_is_expected : bool ,
391390 v : ( hir:: FloatTy , hir:: FloatTy ) )
392391 -> ty:: TypeError < ' tcx >
393392{
394393 let ( a, b) = v;
395- TypeError :: FloatMismatch ( ty_relate :: expected_found_bool ( a_is_expected, & a, & b) )
394+ TypeError :: FloatMismatch ( ty :: relate :: expected_found_bool ( a_is_expected, & a, & b) )
396395}
0 commit comments