diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-05-14 14:28:32 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-05-14 14:28:32 +0200 |
| commit | 180b859b265679cce46dac331b4b4bac47a0286d (patch) | |
| tree | c068c435de542e7a4d101a9b37c28f7fb2c0c440 | |
| parent | f20d586c6fe90ac29f71b9568bd67e81e676c112 (diff) | |
| download | rust-180b859b265679cce46dac331b4b4bac47a0286d.tar.gz rust-180b859b265679cce46dac331b4b4bac47a0286d.zip | |
Add comment to explain what is the top parameter
| -rw-r--r-- | src/librustdoc/html/render.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index a2e843828f7..082dd714752 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -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(); |
