Skip to content

Commit 59c83e3

Browse files
author
Ulrik Sverdrup
committed
---
yaml --- r: 208311 b: refs/heads/snap-stage3 c: c46f3ff h: refs/heads/master i: 208309: 18b35a9 208307: 2724dc0 208303: 75e1679 v: v3
1 parent 091cb05 commit 59c83e3

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ff4e06104903c8cb03600739fa51afb905188b18
4+
refs/heads/snap-stage3: c46f3ff12b0a0b9c55df89eeb92603e9e488b2a7
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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/snap-stage3/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)