Skip to content

Commit

Permalink
placate tidy.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Feb 1, 2021
1 parent 532332f commit a7745d9
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions compiler/rustc_builtin_macros/src/deriving/debug.rs
Expand Up @@ -97,11 +97,8 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
}
ast::VariantData::Struct(..) => {
// normal struct/struct variant
let fn_path_debug_struct =
cx.std_path(&[sym::fmt, sym::Formatter, sym::debug_struct]);
let expr = cx.expr_call_global(
span, fn_path_debug_struct, vec![fmt, name]
);
let fn_path_debug_struct = cx.std_path(&[sym::fmt, sym::Formatter, sym::debug_struct]);
let expr = cx.expr_call_global(span, fn_path_debug_struct, vec![fmt, name]);
stmts.push(cx.stmt_let(DUMMY_SP, true, builder, expr));

for field in fields {
Expand All @@ -115,11 +112,8 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
let field = cx.expr_addr_of(field.span, field.self_.clone());
let field = cx.expr_addr_of(field.span, field);
let builder_recv = make_mut_borrow(cx, span, builder_expr.clone());
let expr = cx.expr_call_global(
span,
fn_path_field,
vec![builder_recv, name, field],
);
let expr =
cx.expr_call_global(span, fn_path_field, vec![builder_recv, name, field]);
stmts.push(stmt_let_underscore(cx, span, expr));
}
fn_path_finish = cx.std_path(&[sym::fmt, sym::DebugStruct, sym::finish]);
Expand Down

0 comments on commit a7745d9

Please sign in to comment.