1
Fork 0

Auto merge of #90844 - camelid:cleanup-vis, r=jyn514

rustdoc: Finish transition to computed visibility

This finishes the transition to using computed visibility in rustdoc.
This commit is contained in:
bors 2021-11-21 13:26:31 +00:00
commit 49d42325d0
3 changed files with 41 additions and 74 deletions

View file

@ -520,7 +520,7 @@ pub(super) fn display_macro_source(
name: Symbol,
def: &ast::MacroDef,
def_id: DefId,
vis: impl Clean<Visibility>,
vis: Visibility,
) -> String {
let tts: Vec<_> = def.body.inner_tokens().into_trees().collect();
// Extract the spans of all matchers. They represent the "interface" of the macro.
@ -529,8 +529,6 @@ pub(super) fn display_macro_source(
if def.macro_rules {
format!("macro_rules! {} {{\n{}}}", name, render_macro_arms(matchers, ";"))
} else {
let vis = vis.clean(cx);
if matchers.len() <= 1 {
format!(
"{}macro {}{} {{\n ...\n}}",