@@ -209,7 +209,7 @@ fn intersection(a: int_ty_set, b: int_ty_set) -> int_ty_set {
209
209
210
210
fn single_type_contained_in ( tcx : ty:: ctxt , a : int_ty_set ) ->
211
211
option < ty:: t > {
212
- #debug[ "type_contained_in (a=%s)" , uint:: to_str ( * a, 10 u) ] ;
212
+ #debug[ "single_type_contained_in (a=%s)" , uint:: to_str ( * a, 10 u) ] ;
213
213
214
214
if * a == INT_TY_SET_i8 { ret some ( ty:: mk_i8 ( tcx) ) ; }
215
215
if * a == INT_TY_SET_u8 { ret some ( ty:: mk_u8 ( tcx) ) ; }
@@ -219,15 +219,11 @@ fn single_type_contained_in(tcx: ty::ctxt, a: int_ty_set) ->
219
219
if * a == INT_TY_SET_u32 { ret some ( ty:: mk_u32 ( tcx) ) ; }
220
220
if * a == INT_TY_SET_i64 { ret some ( ty:: mk_i64 ( tcx) ) ; }
221
221
if * a == INT_TY_SET_u64 { ret some ( ty:: mk_u64 ( tcx) ) ; }
222
- if * a == INT_TY_SET_i { ret ( some ( ty:: mk_int ( tcx) ) ) ; }
223
- if * a == INT_TY_SET_u { ret ( some ( ty:: mk_uint ( tcx) ) ) ; }
222
+ if * a == INT_TY_SET_i { ret some ( ty:: mk_int ( tcx) ) ; }
223
+ if * a == INT_TY_SET_u { ret some ( ty:: mk_uint ( tcx) ) ; }
224
224
ret none;
225
225
}
226
226
227
- fn is_subset_of ( a : int_ty_set , b : int_ty_set ) -> bool {
228
- ( * a & * b) == * a
229
- }
230
-
231
227
fn convert_integral_ty_to_int_ty_set ( tcx : ty:: ctxt , t : ty:: t )
232
228
-> int_ty_set {
233
229
@@ -1647,11 +1643,13 @@ fn super_tys<C:combine>(
1647
1643
self . infcx( ) . vars_integral( self . infcx( ) . tvib, a_id, b_id) . then { ||
1648
1644
ok( a) }
1649
1645
}
1650
- ( ty:: ty_var_integral( a_id) , _) {
1646
+ ( ty:: ty_var_integral( a_id) , ty:: ty_int( _) ) |
1647
+ ( ty:: ty_var_integral( a_id) , ty:: ty_uint( _) ) {
1651
1648
self . infcx( ) . vart_integral( self . infcx( ) . tvib, a_id, b) . then { ||
1652
1649
ok( a) }
1653
1650
}
1654
- ( _, ty:: ty_var_integral( b_id) ) {
1651
+ ( ty:: ty_int( _) , ty:: ty_var_integral( b_id) ) |
1652
+ ( ty:: ty_uint( _) , ty:: ty_var_integral( b_id) ) {
1655
1653
self . infcx( ) . tvar_integral( self . infcx( ) . tvib, a, b_id) . then { ||
1656
1654
ok( a) }
1657
1655
}
0 commit comments