Skip to content

Commit 02c5ff7

Browse files
committed
syntax: Clean up the indentation for #[derive(Eq)]
1 parent d1cb3b3 commit 02c5ff7

File tree

1 file changed

+14
-12
lines changed
  • src/libsyntax/ext/deriving/cmp

1 file changed

+14
-12
lines changed

src/libsyntax/ext/deriving/cmp/eq.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,20 @@ pub fn expand_deriving_eq(cx: &mut ExtCtxt,
2424
push: &mut FnMut(P<Item>))
2525
{
2626
fn cs_total_eq_assert(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> {
27-
cs_same_method(|cx, span, exprs| {
28-
// create `a.<method>(); b.<method>(); c.<method>(); ...`
29-
// (where method is `assert_receiver_is_total_eq`)
30-
let stmts = exprs.into_iter().map(|e| cx.stmt_expr(e)).collect();
31-
let block = cx.block(span, stmts, None);
32-
cx.expr_block(block)
33-
},
34-
Box::new(|cx, sp, _, _| {
35-
cx.span_bug(sp, "non matching enums in derive(Eq)?") }),
36-
cx,
37-
span,
38-
substr)
27+
cs_same_method(
28+
|cx, span, exprs| {
29+
// create `a.<method>(); b.<method>(); c.<method>(); ...`
30+
// (where method is `assert_receiver_is_total_eq`)
31+
let stmts = exprs.into_iter().map(|e| cx.stmt_expr(e)).collect();
32+
let block = cx.block(span, stmts, None);
33+
cx.expr_block(block)
34+
},
35+
Box::new(|cx, sp, _, _| {
36+
cx.span_bug(sp, "non matching enums in derive(Eq)?") }),
37+
cx,
38+
span,
39+
substr
40+
)
3941
}
4042

4143
let inline = cx.meta_word(span, InternedString::new("inline"));

0 commit comments

Comments
 (0)