@@ -2717,29 +2717,6 @@ fn check_fn(&@crate_ctxt ccx, &ast::fn_decl decl, ast::proto proto,
2717
2717
ret rec( decl=decl, proto=proto, body=body) ;
2718
2718
}
2719
2719
2720
- fn check_item_fn( & @crate_ctxt ccx, & span sp, & ast:: ident ident, & ast:: _fn f,
2721
- & vec[ ast:: ty_param] ty_params, & ast:: def_id id,
2722
- & ast:: ann ann) -> @ast:: item {
2723
-
2724
- // FIXME: duplicate work: the item annotation already has the arg types
2725
- // and return type translated to typeck::ty values. We don't need do to it
2726
- // again here, we can extract them.
2727
-
2728
- let vec[ arg] inputs = [ ] ;
2729
- for ( ast:: arg arg in f. decl. inputs) {
2730
- auto input_ty = ast_ty_to_ty_crate( ccx, arg. ty) ;
2731
- inputs += [ rec( mode=ast_mode_to_mode( arg. mode) , ty=input_ty) ] ;
2732
- }
2733
-
2734
- auto output_ty = ast_ty_to_ty_crate( ccx, f. decl. output) ;
2735
- auto typ = ty:: mk_fn( ccx. tcx, f. proto, inputs, output_ty) ;
2736
- auto fn_ann = triv_ann( ann. id, typ) ;
2737
- write_type_only( ccx. node_types, ann. id, typ) ;
2738
-
2739
- auto item = ast:: item_fn( ident, f, ty_params, id, fn_ann) ;
2740
- ret @fold:: respan[ ast:: item_] ( sp, item) ;
2741
- }
2742
-
2743
2720
fn update_obj_fields( & @crate_ctxt ccx, & @ast:: item i) -> @crate_ctxt {
2744
2721
alt ( i. node) {
2745
2722
case ( ast : : item_obj( _, ?ob, _, ?obj_def_ids, _) ) {
@@ -2839,8 +2816,7 @@ fn check_crate(&ty::ctxt tcx, &@ast::crate crate) -> typecheck_result {
2839
2816
auto fld = fold:: new_identity_fold[ @crate_ctxt] ( ) ;
2840
2817
2841
2818
fld = @rec ( update_env_for_item = bind update_obj_fields ( _, _) ,
2842
- fold_fn = bind check_fn ( _, _, _, _) ,
2843
- fold_item_fn = bind check_item_fn ( _, _, _, _, _, _, _)
2819
+ fold_fn = bind check_fn ( _, _, _, _)
2844
2820
with * fld) ;
2845
2821
2846
2822
auto crate_1 = fold:: fold_crate[ @crate_ctxt] ( ccx, fld, crate ) ;
0 commit comments