From c46f3ff12b0a0b9c55df89eeb92603e9e488b2a7 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Sat, 9 May 2015 00:16:20 +0200 Subject: rustdoc: Add Associated Constants section Section only visible if there are assoc. consts. present. --- src/librustdoc/html/render.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/librustdoc/html') diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 4074a659442..55e16db596a 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1862,6 +1862,17 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, try!(write!(w, "")); } + if !consts.is_empty() { + try!(write!(w, " +

Associated Constants

+
+ ")); + for t in &consts { + try!(trait_item(w, *t)); + } + try!(write!(w, "
")); + } + // Output the documentation for each function individually if !required.is_empty() { try!(write!(w, " -- cgit 1.4.1-3-g733a5