Remove Clean trait implementation for hir::TypeBinding

This commit is contained in:
Guillaume Gomez 2022-07-31 14:21:07 +02:00
parent 279af1d7e0
commit 9dd59ddfbf

View File

@ -1884,7 +1884,8 @@ impl<'tcx> Clean<'tcx, GenericArgs> for hir::GenericArgs<'tcx> {
}) })
.collect::<Vec<_>>() .collect::<Vec<_>>()
.into(); .into();
let bindings = self.bindings.iter().map(|x| x.clean(cx)).collect::<Vec<_>>().into(); let bindings =
self.bindings.iter().map(|x| clean_type_binding(x, cx)).collect::<Vec<_>>().into();
GenericArgs::AngleBracketed { args, bindings } GenericArgs::AngleBracketed { args, bindings }
} }
} }
@ -2250,12 +2251,13 @@ fn clean_maybe_renamed_foreign_item<'tcx>(
}) })
} }
impl<'tcx> Clean<'tcx, TypeBinding> for hir::TypeBinding<'tcx> { fn clean_type_binding<'tcx>(
fn clean(&self, cx: &mut DocContext<'tcx>) -> TypeBinding { type_binding: &hir::TypeBinding<'tcx>,
TypeBinding { cx: &mut DocContext<'tcx>,
assoc: PathSegment { name: self.ident.name, args: self.gen_args.clean(cx) }, ) -> TypeBinding {
kind: self.kind.clean(cx), TypeBinding {
} assoc: PathSegment { name: type_binding.ident.name, args: type_binding.gen_args.clean(cx) },
kind: type_binding.kind.clean(cx),
} }
} }