mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
placate tidy.
This commit is contained in:
parent
532332fa8f
commit
a7745d965e
@ -97,11 +97,8 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
|
|||||||
}
|
}
|
||||||
ast::VariantData::Struct(..) => {
|
ast::VariantData::Struct(..) => {
|
||||||
// normal struct/struct variant
|
// normal struct/struct variant
|
||||||
let fn_path_debug_struct =
|
let fn_path_debug_struct = cx.std_path(&[sym::fmt, sym::Formatter, sym::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 expr = cx.expr_call_global(
|
|
||||||
span, fn_path_debug_struct, vec![fmt, name]
|
|
||||||
);
|
|
||||||
stmts.push(cx.stmt_let(DUMMY_SP, true, builder, expr));
|
stmts.push(cx.stmt_let(DUMMY_SP, true, builder, expr));
|
||||||
|
|
||||||
for field in fields {
|
for field in fields {
|
||||||
@ -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.self_.clone());
|
||||||
let field = cx.expr_addr_of(field.span, field);
|
let field = cx.expr_addr_of(field.span, field);
|
||||||
let builder_recv = make_mut_borrow(cx, span, builder_expr.clone());
|
let builder_recv = make_mut_borrow(cx, span, builder_expr.clone());
|
||||||
let expr = cx.expr_call_global(
|
let expr =
|
||||||
span,
|
cx.expr_call_global(span, fn_path_field, vec![builder_recv, name, field]);
|
||||||
fn_path_field,
|
|
||||||
vec![builder_recv, name, field],
|
|
||||||
);
|
|
||||||
stmts.push(stmt_let_underscore(cx, span, expr));
|
stmts.push(stmt_let_underscore(cx, span, expr));
|
||||||
}
|
}
|
||||||
fn_path_finish = cx.std_path(&[sym::fmt, sym::DebugStruct, sym::finish]);
|
fn_path_finish = cx.std_path(&[sym::fmt, sym::DebugStruct, sym::finish]);
|
||||||
|
Loading…
Reference in New Issue
Block a user