@@ -2489,7 +2489,7 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
2489
2489
}
2490
2490
2491
2491
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 ,
2493
2493
outer_version : Option < & str > ) -> fmt:: Result {
2494
2494
let shortty = shortty ( item) ;
2495
2495
let name = item. name . as_ref ( ) . unwrap ( ) ;
@@ -2540,7 +2540,7 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
2540
2540
_ => panic ! ( "can't make docs for trait item with name {:?}" , item. name)
2541
2541
}
2542
2542
2543
- if !is_static || render_static {
2543
+ if !is_default_item && ( ! is_static || render_static) {
2544
2544
document ( w, cx, item)
2545
2545
} else {
2546
2546
Ok ( ( ) )
@@ -2549,7 +2549,7 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
2549
2549
2550
2550
write ! ( w, "<div class='impl-items'>" ) ?;
2551
2551
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) ?;
2553
2553
}
2554
2554
2555
2555
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
2566
2566
let did = i. trait_ . as_ref ( ) . unwrap ( ) . def_id ( ) . unwrap ( ) ;
2567
2567
let assoc_link = AssocItemLink :: GotoSource ( did, & i. provided_trait_methods ) ;
2568
2568
2569
- doctraititem ( w, cx, trait_item, assoc_link, render_static,
2569
+ doctraititem ( w, cx, trait_item, assoc_link, render_static, true ,
2570
2570
outer_version) ?;
2571
2571
}
2572
2572
Ok ( ( ) )
0 commit comments