@@ -24,18 +24,20 @@ pub fn expand_deriving_eq(cx: &mut ExtCtxt,
24
24
push : & mut FnMut ( P < Item > ) )
25
25
{
26
26
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
+ )
39
41
}
40
42
41
43
let inline = cx. meta_word ( span, InternedString :: new ( "inline" ) ) ;
0 commit comments