diff options
Diffstat (limited to 'src/librustdoc/clean/inline.rs')
| -rw-r--r-- | src/librustdoc/clean/inline.rs | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 111827aacdf..e8f0960da79 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -566,9 +566,11 @@ fn build_macro(cx: &mut DocContext<'_>, did: DefId, name: Symbol) -> clean::Item fn filter_non_trait_generics(trait_did: DefId, mut g: clean::Generics) -> clean::Generics { for pred in &mut g.where_predicates { match *pred { - clean::WherePredicate::BoundPredicate { ty: clean::Generic(ref s), ref mut bounds } - if *s == kw::SelfUpper => - { + clean::WherePredicate::BoundPredicate { + ty: clean::Generic(ref s), + ref mut bounds, + .. + } if *s == kw::SelfUpper => { bounds.retain(|bound| match *bound { clean::GenericBound::TraitBound( clean::PolyTrait { trait_: clean::ResolvedPath { did, .. }, .. }, @@ -591,6 +593,7 @@ fn filter_non_trait_generics(trait_did: DefId, mut g: clean::Generics) -> clean: .. }, ref bounds, + .. } => !(bounds.is_empty() || *s == kw::SelfUpper && did == trait_did), _ => true, }); @@ -605,7 +608,7 @@ fn separate_supertrait_bounds( ) -> (clean::Generics, Vec<clean::GenericBound>) { let mut ty_bounds = Vec::new(); g.where_predicates.retain(|pred| match *pred { - clean::WherePredicate::BoundPredicate { ty: clean::Generic(ref s), ref bounds } + clean::WherePredicate::BoundPredicate { ty: clean::Generic(ref s), ref bounds, .. } if *s == kw::SelfUpper => { ty_bounds.extend(bounds.iter().cloned()); | 
