Add comment to explain what is the top parameter
This commit is contained in:
parent
f20d586c6f
commit
180b859b26
1 changed files with 8 additions and 0 deletions
|
|
@ -3789,6 +3789,14 @@ const ATTRIBUTE_WHITELIST: &'static [&'static str] = &[
|
|||
"non_exhaustive"
|
||||
];
|
||||
|
||||
// The `top` parameter is used when generating the item declaration to ensure it doesn't have a
|
||||
// left padding. For example:
|
||||
//
|
||||
// #[foo] <----- "top" attribute
|
||||
// struct Foo {
|
||||
// #[bar] <---- not "top" attribute
|
||||
// bar: usize,
|
||||
// }
|
||||
fn render_attributes(w: &mut dyn fmt::Write, it: &clean::Item, top: bool) -> fmt::Result {
|
||||
let mut attrs = String::new();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue