@@ -2041,31 +2041,6 @@ mod unify {
2041
2041
ret ures_ok( t) ;
2042
2042
}
2043
2043
2044
- // FIXME: This function should not be necessary, but it is for now until
2045
- // we eliminate pushdown. The typechecker should never rely on early
2046
- // resolution of type variables.
2047
- fn resolve_all_vars( & ty_ctxt tcx, & @var_bindings vb, t typ) -> t {
2048
- if ( !type_contains_vars( tcx, typ) ) { ret typ; }
2049
-
2050
- fn folder( ty_ctxt tcx, @var_bindings vb, int vid) -> t {
2051
- // It's possible that we haven't even created the var set.
2052
- // Handle this case gracefully.
2053
- if ( ( vid as uint) >= ufind:: set_count( vb. sets) ) {
2054
- ret ty:: mk_var( tcx, vid) ;
2055
- }
2056
-
2057
- auto root_id = ufind:: find( vb. sets, vid as uint) ;
2058
- alt ( smallintmap:: find[ t] ( vb. types, root_id) ) {
2059
- case ( some[ t] ( ?typ2) ) {
2060
- ret fold_ty( tcx, fm_var( bind folder( tcx, vb, _) ) , typ2) ;
2061
- }
2062
- case ( none[ t] ) { ret ty:: mk_var( tcx, vid) ; }
2063
- }
2064
- }
2065
-
2066
- ret fold_ty( tcx, fm_var( bind folder( tcx, vb, _) ) , typ) ;
2067
- }
2068
-
2069
2044
// If the given type is a variable, returns the structure of that type.
2070
2045
fn resolve_type_structure( & ty_ctxt tcx, & @var_bindings vb, t typ)
2071
2046
-> fixup_result {
0 commit comments