Skip to content

Commit b00acd7

Browse files
author
Ulrik Sverdrup
committed
---
yaml --- r: 210597 b: refs/heads/try c: c46f3ff h: refs/heads/master i: 210595: a07ba4b v: v3
1 parent a8941b3 commit b00acd7

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: ff4e06104903c8cb03600739fa51afb905188b18
5+
refs/heads/try: c46f3ff12b0a0b9c55df89eeb92603e9e488b2a7
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustdoc/html/render.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,6 +1862,17 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
18621862
try!(write!(w, "</div>"));
18631863
}
18641864

1865+
if !consts.is_empty() {
1866+
try!(write!(w, "
1867+
<h2 id='associated-const'>Associated Constants</h2>
1868+
<div class='methods'>
1869+
"));
1870+
for t in &consts {
1871+
try!(trait_item(w, *t));
1872+
}
1873+
try!(write!(w, "</div>"));
1874+
}
1875+
18651876
// Output the documentation for each function individually
18661877
if !required.is_empty() {
18671878
try!(write!(w, "

branches/try/src/test/rustdoc/assoc-consts.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
pub trait Foo {
1414
// @has assoc_consts/trait.Foo.html '//*[@class="rust trait"]' \
1515
// 'const FOO: usize;'
16+
// @has - '//*[@id="associatedconstant.FOO"]' 'const FOO'
1617
const FOO: usize;
1718
}
1819

0 commit comments

Comments
 (0)