@@ -7,7 +7,6 @@ export ast_fold_precursor;
7
7
export ast_fold;
8
8
export default_ast_fold;
9
9
export make_fold;
10
- export dummy_out;
11
10
export noop_fold_crate;
12
11
export noop_fold_item;
13
12
export noop_fold_expr;
@@ -529,42 +528,7 @@ fn default_ast_fold() -> @ast_fold_precursor {
529
528
new_span : noop_span } ;
530
529
}
531
530
532
- fn dummy_out ( a : ast_fold ) {
533
- * a =
534
- { fold_crate : nf_crate_dummy ,
535
- fold_crate_directive : nf_crate_directive_dummy ,
536
- fold_view_item : nf_view_item_dummy ,
537
- fold_native_item : nf_native_item_dummy ,
538
- fold_item : nf_item_dummy ,
539
- fold_item_underscore : nf_item_underscore_dummy ,
540
- fold_method : nf_method_dummy ,
541
- fold_block : nf_blk_dummy ,
542
- fold_stmt : nf_stmt_dummy ,
543
- fold_arm : nf_arm_dummy ,
544
- fold_pat : nf_pat_dummy ,
545
- fold_decl : nf_decl_dummy ,
546
- fold_expr : nf_expr_dummy ,
547
- fold_ty : nf_ty_dummy ,
548
- fold_constr : nf_constr_dummy ,
549
- fold_fn : nf_fn_dummy ,
550
- fold_mod : nf_mod_dummy ,
551
- fold_native_mod : nf_native_mod_dummy ,
552
- fold_variant : nf_variant_dummy ,
553
- fold_ident : nf_ident_dummy ,
554
- fold_path : nf_path_dummy ,
555
- fold_local : nf_local_dummy ,
556
- map_exprs : noop_map_exprs ,
557
- new_id : noop_id ,
558
- new_span : noop_span } ;
559
- }
560
-
561
- // FIXME: Fold has a circular reference that has to be broken. With GC this
562
- // can go away
563
- resource foldres( f: ast_fold) {
564
- dummy_out ( f) ;
565
- }
566
-
567
- fn make_fold ( afp : ast_fold_precursor ) -> @foldres {
531
+ fn make_fold ( afp : ast_fold_precursor ) -> ast_fold {
568
532
// FIXME: Have to bind all the bare functions into shared functions
569
533
// because @mutable is invariant with respect to its contents
570
534
let result : ast_fold =
@@ -702,7 +666,7 @@ fn make_fold(afp: ast_fold_precursor) -> @foldres {
702
666
map_exprs : afp. map_exprs ,
703
667
new_id : afp. new_id ,
704
668
new_span : afp. new_span } ;
705
- ret @ foldres ( result ) ;
669
+ ret result;
706
670
}
707
671
708
672
0 commit comments