Skip to content

Commit dc7eb41

Browse files
camelidMark-Simulacrum
authored andcommitted
Small refactor
1 parent 8f0ce5d commit dc7eb41

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,20 +2311,19 @@ impl Clean<Item> for (&hir::MacroDef<'_>, Option<Symbol>) {
23112311
)
23122312
} else {
23132313
let vis = item.vis.clean(cx);
2314-
let vis_printed_with_space =
2315-
vis.print_with_space(cx.tcx, cx.tcx.hir().local_def_id(item.hir_id).to_def_id());
2314+
let def_id = cx.tcx.hir().local_def_id(item.hir_id).to_def_id();
23162315

23172316
if matchers.len() <= 1 {
23182317
format!(
23192318
"{}macro {}{} {{\n ...\n}}",
2320-
vis_printed_with_space,
2319+
vis.print_with_space(cx.tcx, def_id),
23212320
name,
23222321
matchers.iter().map(|span| span.to_src(cx)).collect::<String>(),
23232322
)
23242323
} else {
23252324
format!(
23262325
"{}macro {} {{\n{}}}",
2327-
vis_printed_with_space,
2326+
vis.print_with_space(cx.tcx, def_id),
23282327
name,
23292328
matchers
23302329
.iter()

0 commit comments

Comments
 (0)