@@ -213,52 +213,52 @@ fn noop_fold_struct_field(&&sf: @struct_field, fld: ast_fold)
213
213
}
214
214
215
215
pub fn noop_fold_item_underscore ( i : item_ , fld : ast_fold ) -> item_ {
216
- return match i {
217
- item_const( t, e) => item_const ( fld. fold_ty ( t) , fld. fold_expr ( e) ) ,
218
- item_fn( decl, purity, typms, ref body) => {
219
- item_fn ( fold_fn_decl ( decl, fld) ,
220
- purity,
221
- fold_ty_params ( typms, fld) ,
222
- fld. fold_block ( ( * body) ) )
223
- }
224
- item_mod( m) => item_mod ( fld. fold_mod ( m) ) ,
225
- item_foreign_mod( nm) => item_foreign_mod ( fld. fold_foreign_mod ( nm) ) ,
226
- item_ty( t, typms) => item_ty ( fld. fold_ty ( t) ,
227
- fold_ty_params ( typms, fld) ) ,
228
- item_enum( ref enum_definition, typms) => {
216
+ match i {
217
+ item_const( t, e) => item_const ( fld. fold_ty ( t) , fld. fold_expr ( e) ) ,
218
+ item_fn( decl, purity, typms, ref body) => {
219
+ item_fn ( fold_fn_decl ( decl, fld) ,
220
+ purity,
221
+ fold_ty_params ( typms, fld) ,
222
+ fld. fold_block ( ( * body) ) )
223
+ }
224
+ item_mod( m) => item_mod ( fld. fold_mod ( m) ) ,
225
+ item_foreign_mod( nm) => item_foreign_mod ( fld. fold_foreign_mod ( nm) ) ,
226
+ item_ty( t, typms) => item_ty ( fld. fold_ty ( t) ,
227
+ fold_ty_params ( typms, fld) ) ,
228
+ item_enum( ref enum_definition, typms) => {
229
229
item_enum ( ast:: enum_def ( ast:: enum_def_ {
230
230
variants : enum_definition. variants . map (
231
231
|x| fld. fold_variant ( * x) ) ,
232
232
common : enum_definition. common . map (
233
233
|x| fold_struct_def ( * x, fld) ) ,
234
234
} ) , fold_ty_params ( typms, fld) )
235
- }
236
- item_struct( struct_def, typms) => {
235
+ }
236
+ item_struct( struct_def, typms) => {
237
237
let struct_def = fold_struct_def ( struct_def, fld) ;
238
238
item_struct ( struct_def, /* FIXME (#2543) */ copy typms)
239
- }
240
- item_impl( tps, ifce, ty, ref methods) => {
241
- item_impl ( fold_ty_params ( tps, fld) ,
242
- ifce. map ( |p| fold_trait_ref ( * p, fld) ) ,
243
- fld. fold_ty ( ty) ,
244
- vec :: map ( * methods , |x| fld. fold_method ( * x) ) )
245
- }
246
- item_trait( tps, traits, ref methods) => {
247
- let methods = do ( * methods) . map |method| {
248
- match * method {
249
- required( * ) => copy * method,
250
- provided( method) => provided ( fld. fold_method ( method) )
251
- }
252
- } ;
239
+ }
240
+ item_impl( tps, ifce, ty, ref methods) => {
241
+ item_impl ( fold_ty_params ( tps, fld) ,
242
+ ifce. map ( |p| fold_trait_ref ( * p, fld) ) ,
243
+ fld. fold_ty ( ty) ,
244
+ methods . map ( |x| fld. fold_method ( * x) ) )
245
+ }
246
+ item_trait( tps, traits, ref methods) => {
247
+ let methods = do methods. map |method| {
248
+ match * method {
249
+ required( * ) => copy * method,
250
+ provided( method) => provided ( fld. fold_method ( method) )
251
+ }
252
+ } ;
253
253
item_trait ( fold_ty_params ( tps, fld) ,
254
- vec :: map ( traits , |p| fold_trait_ref ( * p, fld) ) ,
254
+ traits . map ( |p| fold_trait_ref ( * p, fld) ) ,
255
255
methods)
256
- }
257
- item_mac( ref m) => {
258
- // FIXME #2888: we might actually want to do something here.
259
- item_mac ( ( * m) )
260
- }
261
- } ;
256
+ }
257
+ item_mac( ref m) => {
258
+ // FIXME #2888: we might actually want to do something here.
259
+ item_mac ( ( * m) )
260
+ }
261
+ }
262
262
}
263
263
264
264
fn fold_struct_def ( struct_def : @ast:: struct_def , fld : ast_fold )
0 commit comments