@@ -2652,16 +2652,19 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
2652
2652
if !is_static || render_static {
2653
2653
if !is_default_item {
2654
2654
if let Some ( t) = trait_ {
2655
- let it = t. items . iter ( ) . find ( |i| i. name == item. name ) . unwrap ( ) ;
2656
- // We need the stability of the item from the trait because
2657
- // impls can't have a stability.
2658
- document_stability ( w, cx, it) ?;
2659
- if item. doc_value ( ) . is_some ( ) {
2660
- document_full ( w, item) ?;
2661
- } else {
2662
- // In case the item isn't documented,
2663
- // provide short documentation from the trait.
2664
- document_short ( w, it, link) ?;
2655
+ // The trait item may have been stripped so we might not
2656
+ // find any documentation or stability for it.
2657
+ if let Some ( it) = t. items . iter ( ) . find ( |i| i. name == item. name ) {
2658
+ // We need the stability of the item from the trait
2659
+ // because impls can't have a stability.
2660
+ document_stability ( w, cx, it) ?;
2661
+ if item. doc_value ( ) . is_some ( ) {
2662
+ document_full ( w, item) ?;
2663
+ } else {
2664
+ // In case the item isn't documented,
2665
+ // provide short documentation from the trait.
2666
+ document_short ( w, it, link) ?;
2667
+ }
2665
2668
}
2666
2669
} else {
2667
2670
document ( w, cx, item) ?;
0 commit comments