@@ -76,44 +76,44 @@ impl<'infcx, 'gcx, 'tcx> InferCtxt<'infcx, 'gcx, 'tcx> {
7676
7777 match ( & a. sty , & b. sty ) {
7878 // Relate integral variables to other types
79- ( & ty:: TyInfer ( ty:: IntVar ( a_id) ) , & ty:: TyInfer ( ty:: IntVar ( b_id) ) ) => {
79+ ( & ty:: Infer ( ty:: IntVar ( a_id) ) , & ty:: Infer ( ty:: IntVar ( b_id) ) ) => {
8080 self . int_unification_table
8181 . borrow_mut ( )
8282 . unify_var_var ( a_id, b_id)
8383 . map_err ( |e| int_unification_error ( a_is_expected, e) ) ?;
8484 Ok ( a)
8585 }
86- ( & ty:: TyInfer ( ty:: IntVar ( v_id) ) , & ty:: TyInt ( v) ) => {
86+ ( & ty:: Infer ( ty:: IntVar ( v_id) ) , & ty:: TyInt ( v) ) => {
8787 self . unify_integral_variable ( a_is_expected, v_id, IntType ( v) )
8888 }
89- ( & ty:: TyInt ( v) , & ty:: TyInfer ( ty:: IntVar ( v_id) ) ) => {
89+ ( & ty:: TyInt ( v) , & ty:: Infer ( ty:: IntVar ( v_id) ) ) => {
9090 self . unify_integral_variable ( !a_is_expected, v_id, IntType ( v) )
9191 }
92- ( & ty:: TyInfer ( ty:: IntVar ( v_id) ) , & ty:: TyUint ( v) ) => {
92+ ( & ty:: Infer ( ty:: IntVar ( v_id) ) , & ty:: TyUint ( v) ) => {
9393 self . unify_integral_variable ( a_is_expected, v_id, UintType ( v) )
9494 }
95- ( & ty:: TyUint ( v) , & ty:: TyInfer ( ty:: IntVar ( v_id) ) ) => {
95+ ( & ty:: TyUint ( v) , & ty:: Infer ( ty:: IntVar ( v_id) ) ) => {
9696 self . unify_integral_variable ( !a_is_expected, v_id, UintType ( v) )
9797 }
9898
9999 // Relate floating-point variables to other types
100- ( & ty:: TyInfer ( ty:: FloatVar ( a_id) ) , & ty:: TyInfer ( ty:: FloatVar ( b_id) ) ) => {
100+ ( & ty:: Infer ( ty:: FloatVar ( a_id) ) , & ty:: Infer ( ty:: FloatVar ( b_id) ) ) => {
101101 self . float_unification_table
102102 . borrow_mut ( )
103103 . unify_var_var ( a_id, b_id)
104104 . map_err ( |e| float_unification_error ( relation. a_is_expected ( ) , e) ) ?;
105105 Ok ( a)
106106 }
107- ( & ty:: TyInfer ( ty:: FloatVar ( v_id) ) , & ty:: TyFloat ( v) ) => {
107+ ( & ty:: Infer ( ty:: FloatVar ( v_id) ) , & ty:: TyFloat ( v) ) => {
108108 self . unify_float_variable ( a_is_expected, v_id, v)
109109 }
110- ( & ty:: TyFloat ( v) , & ty:: TyInfer ( ty:: FloatVar ( v_id) ) ) => {
110+ ( & ty:: TyFloat ( v) , & ty:: Infer ( ty:: FloatVar ( v_id) ) ) => {
111111 self . unify_float_variable ( !a_is_expected, v_id, v)
112112 }
113113
114114 // All other cases of inference are errors
115- ( & ty:: TyInfer ( _) , _) |
116- ( _, & ty:: TyInfer ( _) ) => {
115+ ( & ty:: Infer ( _) , _) |
116+ ( _, & ty:: Infer ( _) ) => {
117117 Err ( TypeError :: Sorts ( ty:: relate:: expected_found ( relation, & a, & b) ) )
118118 }
119119
@@ -393,7 +393,7 @@ impl<'cx, 'gcx, 'tcx> TypeRelation<'cx, 'gcx, 'tcx> for Generalizer<'cx, 'gcx, '
393393 // subtyping. This is basically our "occurs check", preventing
394394 // us from creating infinitely sized types.
395395 match t. sty {
396- ty:: TyInfer ( ty:: TyVar ( vid) ) => {
396+ ty:: Infer ( ty:: TyVar ( vid) ) => {
397397 let mut variables = self . infcx . type_variables . borrow_mut ( ) ;
398398 let vid = variables. root_var ( vid) ;
399399 let sub_vid = variables. sub_root_var ( vid) ;
@@ -433,8 +433,8 @@ impl<'cx, 'gcx, 'tcx> TypeRelation<'cx, 'gcx, 'tcx> for Generalizer<'cx, 'gcx, '
433433 }
434434 }
435435 }
436- ty:: TyInfer ( ty:: IntVar ( _) ) |
437- ty:: TyInfer ( ty:: FloatVar ( _) ) => {
436+ ty:: Infer ( ty:: IntVar ( _) ) |
437+ ty:: Infer ( ty:: FloatVar ( _) ) => {
438438 // No matter what mode we are in,
439439 // integer/floating-point types must be equal to be
440440 // relatable.
0 commit comments