@@ -553,7 +553,7 @@ fn ty_of_obj_ctor(tcx: ty::ctxt, mode: mode, id: ast::ident, ob: ast::_obj,
553
553
let t_field = ast_ty_to_ty ( tcx, mode, f. ty ) ;
554
554
t_inputs += [ { mode: ast:: by_copy, ty: t_field} ] ;
555
555
}
556
- let t_fn = ty:: mk_fn ( tcx, { proto: ast:: proto_shared ( ast :: sugar_normal ) ,
556
+ let t_fn = ty:: mk_fn ( tcx, { proto: ast:: proto_shared,
557
557
inputs: t_inputs, output: t_obj. ty ,
558
558
ret_style: ast:: return_val, constraints: [ ] } ) ;
559
559
let tpt = { bounds: ty_param_bounds ( tcx, mode, ty_params) , ty: t_fn} ;
@@ -697,7 +697,7 @@ mod collect {
697
697
}
698
698
// FIXME: this will be different for constrained types
699
699
ty:: mk_fn ( cx. tcx ,
700
- { proto: ast:: proto_shared ( ast :: sugar_normal ) ,
700
+ { proto: ast:: proto_shared,
701
701
inputs: args, output: tag_ty,
702
702
ret_style: ast:: return_val, constraints: [ ] } )
703
703
} ;
@@ -799,13 +799,13 @@ mod collect {
799
799
let t_res = ty:: mk_res ( cx. tcx , local_def ( it. id ) , t_arg. ty ,
800
800
params) ;
801
801
let t_ctor = ty:: mk_fn ( cx. tcx , {
802
- proto: ast:: proto_shared ( ast :: sugar_normal ) ,
802
+ proto: ast:: proto_shared,
803
803
inputs: [ { mode: ast:: by_copy with t_arg} ] ,
804
804
output: t_res,
805
805
ret_style: ast:: return_val, constraints: [ ]
806
806
} ) ;
807
807
let t_dtor = ty:: mk_fn ( cx. tcx , {
808
- proto: ast:: proto_shared ( ast :: sugar_normal ) ,
808
+ proto: ast:: proto_shared,
809
809
inputs: [ t_arg] , output: ty:: mk_nil ( cx. tcx ) ,
810
810
ret_style: ast:: return_val, constraints: [ ]
811
811
} ) ;
@@ -1172,9 +1172,9 @@ fn gather_locals(ccx: @crate_ctxt,
1172
1172
} ;
1173
1173
let tcx = ccx. tcx ;
1174
1174
1175
- let next_var_id = lambda ( ) -> int { let rv = * nvi; * nvi += 1 ; ret rv; } ;
1175
+ let next_var_id = fn @ ( ) -> int { let rv = * nvi; * nvi += 1 ; ret rv; } ;
1176
1176
let assign =
1177
- lambda ( nid: ast:: node_id, ty_opt: option:: t<ty:: t>) {
1177
+ fn @ ( nid: ast:: node_id, ty_opt: option:: t<ty:: t>) {
1178
1178
let var_id = next_var_id ( ) ;
1179
1179
locals. insert ( nid, var_id) ;
1180
1180
alt ty_opt {
@@ -1206,15 +1206,15 @@ fn gather_locals(ccx: @crate_ctxt,
1206
1206
1207
1207
// Add explicitly-declared locals.
1208
1208
let visit_local =
1209
- lambda ( local: @ast:: local, & & e : ( ) , v: visit:: vt<( ) >) {
1209
+ fn @ ( local: @ast:: local, & & e : ( ) , v: visit:: vt<( ) >) {
1210
1210
let local_ty = ast_ty_to_ty_crate_infer ( ccx, local. node . ty ) ;
1211
1211
assign ( local. node . id , local_ty) ;
1212
1212
visit:: visit_local ( local, e, v) ;
1213
1213
} ;
1214
1214
1215
1215
// Add pattern bindings.
1216
1216
let visit_pat =
1217
- lambda ( p: @ast:: pat, & & e : ( ) , v: visit:: vt<( ) >) {
1217
+ fn @ ( p: @ast:: pat, & & e : ( ) , v: visit:: vt<( ) >) {
1218
1218
alt p. node {
1219
1219
ast:: pat_bind ( _, _) { assign ( p. id , none) ; }
1220
1220
_ { /* no-op */ }
@@ -1726,7 +1726,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
1726
1726
// of arguments when we typecheck the functions. This isn't really the
1727
1727
// right way to do this.
1728
1728
let check_args =
1729
- lambda ( check_blocks: bool ) -> bool {
1729
+ fn @ ( check_blocks: bool ) -> bool {
1730
1730
let i = 0 u;
1731
1731
let bot = false ;
1732
1732
for a_opt: option:: t < @ast:: expr > in args {
@@ -2179,7 +2179,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
2179
2179
fn lower_bound_proto ( proto : ast:: proto ) -> ast:: proto {
2180
2180
// FIXME: This is right for bare fns, possibly not others
2181
2181
alt proto {
2182
- ast : : proto_bare. { ast:: proto_shared ( ast :: sugar_normal ) }
2182
+ ast : : proto_bare. { ast:: proto_shared }
2183
2183
_ { proto }
2184
2184
}
2185
2185
}
@@ -2632,7 +2632,7 @@ fn check_const(ccx: @crate_ctxt, _sp: span, e: @ast::expr, id: ast::node_id) {
2632
2632
let fcx: @fn_ctxt =
2633
2633
@{ ret_ty: rty,
2634
2634
purity: ast:: pure_fn,
2635
- proto: ast:: proto_shared ( ast :: sugar_normal ) ,
2635
+ proto: ast:: proto_shared,
2636
2636
var_bindings: ty:: unify:: mk_var_bindings ( ) ,
2637
2637
locals: new_int_hash :: < int > ( ) ,
2638
2638
next_var_id: @mutable 0 ,
0 commit comments