Skip to content

Commit cdc4674

Browse files
committed
---
yaml --- r: 275436 b: refs/heads/auto c: ec5e0f8 h: refs/heads/master
1 parent 5158edf commit cdc4674

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: d95ca2822cdc67ddec96d16533e23a10d6bfd136
11+
refs/heads/auto: ec5e0f81cf54ca287e6652923e1bf46f4fc1c783
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
24892489
}
24902490

24912491
fn doctraititem(w: &mut fmt::Formatter, cx: &Context, item: &clean::Item,
2492-
link: AssocItemLink, render_static: bool,
2492+
link: AssocItemLink, render_static: bool, is_default_item: bool,
24932493
outer_version: Option<&str>) -> fmt::Result {
24942494
let shortty = shortty(item);
24952495
let name = item.name.as_ref().unwrap();
@@ -2540,7 +2540,7 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
25402540
_ => panic!("can't make docs for trait item with name {:?}", item.name)
25412541
}
25422542

2543-
if !is_static || render_static {
2543+
if !is_default_item && (!is_static || render_static) {
25442544
document(w, cx, item)
25452545
} else {
25462546
Ok(())
@@ -2549,7 +2549,7 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
25492549

25502550
write!(w, "<div class='impl-items'>")?;
25512551
for trait_item in &i.impl_.items {
2552-
doctraititem(w, cx, trait_item, link, render_header, outer_version)?;
2552+
doctraititem(w, cx, trait_item, link, render_header, false, outer_version)?;
25532553
}
25542554

25552555
fn render_default_items(w: &mut fmt::Formatter,
@@ -2566,7 +2566,7 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
25662566
let did = i.trait_.as_ref().unwrap().def_id().unwrap();
25672567
let assoc_link = AssocItemLink::GotoSource(did, &i.provided_trait_methods);
25682568

2569-
doctraititem(w, cx, trait_item, assoc_link, render_static,
2569+
doctraititem(w, cx, trait_item, assoc_link, render_static, true,
25702570
outer_version)?;
25712571
}
25722572
Ok(())

branches/auto/src/test/rustdoc/manual_impl.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// @has manual_impl/trait.T.html
12+
// @has - '//*[@class="docblock"]' 'Docs associated with the trait definition.'
13+
// @has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.'
14+
// @has - '//*[@class="docblock"]' 'Docs associated with the trait b_method definition.'
1115
/// Docs associated with the trait definition.
1216
pub trait T {
1317
/// Docs associated with the trait a_method definition.

0 commit comments

Comments
 (0)