@@ -2055,19 +2055,27 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr, unify: &unifier,
2055
2055
bot = check_call_or_bind( fcx, expr. span, f, args, kind_bind) ;
2056
2056
2057
2057
// Pull the argument and return types out.
2058
- let ( proto, arg_tys, rt, cf, constrs) =
2059
- alt structure_of( fcx, expr. span, expr_ty( tcx, f) ) {
2060
- // FIXME:
2061
- // probably need to munge the constrs to drop constraints
2062
- // for any bound args
2063
- ty:: ty_fn( proto, arg_tys, rt, cf, constrs) {
2064
- ( proto, arg_tys, rt, cf, constrs)
2065
- }
2066
- ty:: ty_native_fn( _, arg_tys, rt) {
2067
- ( ast:: proto_fn, arg_tys, rt, ast:: return, [ ] )
2068
- }
2069
- _ { fail "LHS of bind expr didn't have a function type?!" ; }
2070
- } ;
2058
+ let proto, arg_tys, rt, cf, constrs;
2059
+ alt structure_of( fcx, expr. span, expr_ty( tcx, f) ) {
2060
+ // FIXME:
2061
+ // probably need to munge the constrs to drop constraints
2062
+ // for any bound args
2063
+ ty:: ty_fn( proto_, arg_tys_, rt_, cf_, constrs_) {
2064
+ proto = proto_;
2065
+ arg_tys = arg_tys_;
2066
+ rt = rt_;
2067
+ cf = cf_;
2068
+ constrs = constrs_;
2069
+ }
2070
+ ty:: ty_native_fn( _, arg_tys_, rt_) {
2071
+ proto = ast:: proto_fn;
2072
+ arg_tys = arg_tys_;
2073
+ rt = rt_;
2074
+ cf = ast:: return;
2075
+ constrs = [ ] ;
2076
+ }
2077
+ _ { fail "LHS of bind expr didn't have a function type?!" ; }
2078
+ } ;
2071
2079
2072
2080
// For each blank argument, add the type of that argument
2073
2081
// to the resulting function type.
0 commit comments