Skip to content

Commit 59ba4fc

Browse files
committed
syntax: fix the indentation of a function
1 parent e6d8426 commit 59ba4fc

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

src/libsyntax/fold.rs

+36-36
Original file line numberDiff line numberDiff line change
@@ -213,52 +213,52 @@ fn noop_fold_struct_field(&&sf: @struct_field, fld: ast_fold)
213213
}
214214

215215
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) => {
229229
item_enum(ast::enum_def(ast::enum_def_ {
230230
variants: enum_definition.variants.map(
231231
|x| fld.fold_variant(*x)),
232232
common: enum_definition.common.map(
233233
|x| fold_struct_def(*x, fld)),
234234
}), fold_ty_params(typms, fld))
235-
}
236-
item_struct(struct_def, typms) => {
235+
}
236+
item_struct(struct_def, typms) => {
237237
let struct_def = fold_struct_def(struct_def, fld);
238238
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+
};
253253
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)),
255255
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+
}
262262
}
263263

264264
fn fold_struct_def(struct_def: @ast::struct_def, fld: ast_fold)

0 commit comments

Comments
 (0)