1
Fork 0

Add pub visibility for methods as well

This commit is contained in:
Guillaume Gomez 2017-09-14 00:20:04 +02:00
parent fd4bef54ab
commit 203d71f507
2 changed files with 35 additions and 2 deletions

View file

@ -2588,7 +2588,8 @@ fn render_assoc_item(w: &mut fmt::Formatter,
href(did).map(|p| format!("{}#{}.{}", p.0, ty, name)).unwrap_or(anchor)
}
};
let mut head_len = format!("{}{}{:#}fn {}{:#}",
let mut head_len = format!("{}{}{}{:#}fn {}{:#}",
VisSpace(&meth.visibility),
ConstnessSpace(constness),
UnsafetySpace(unsafety),
AbiSpace(abi),
@ -2600,8 +2601,9 @@ fn render_assoc_item(w: &mut fmt::Formatter,
} else {
(0, true)
};
write!(w, "{}{}{}fn <a href='{href}' class='fnname'>{name}</a>\
write!(w, "{}{}{}{}fn <a href='{href}' class='fnname'>{name}</a>\
{generics}{decl}{where_clause}",
VisSpace(&meth.visibility),
ConstnessSpace(constness),
UnsafetySpace(unsafety),
AbiSpace(abi),