Skip to content

Commit

Permalink
Remove Clean trait implementation for hir::TypeBindingKind
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 31, 2022
1 parent 9dd59dd commit fc1c858
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2257,19 +2257,13 @@ fn clean_type_binding<'tcx>(
) -> TypeBinding {
TypeBinding {
assoc: PathSegment { name: type_binding.ident.name, args: type_binding.gen_args.clean(cx) },
kind: type_binding.kind.clean(cx),
}
}

impl<'tcx> Clean<'tcx, TypeBindingKind> for hir::TypeBindingKind<'tcx> {
fn clean(&self, cx: &mut DocContext<'tcx>) -> TypeBindingKind {
match *self {
kind: match type_binding.kind {
hir::TypeBindingKind::Equality { ref term } => {
TypeBindingKind::Equality { term: clean_hir_term(term, cx) }
}
hir::TypeBindingKind::Constraint { bounds } => TypeBindingKind::Constraint {
bounds: bounds.iter().filter_map(|b| b.clean(cx)).collect(),
},
}
},
}
}

0 comments on commit fc1c858

Please sign in to comment.