about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-07-31 14:21:07 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-07-31 14:21:07 +0200
commit9dd59ddfbf8e6b2c33da513c9d1aeb17ef81bccb (patch)
treeae866a2fe22053216339cea61859b9fdda4911e1 /src
parent279af1d7e06b5b5dcb0d0538d6f11ad5e974127a (diff)
downloadrust-9dd59ddfbf8e6b2c33da513c9d1aeb17ef81bccb.tar.gz
rust-9dd59ddfbf8e6b2c33da513c9d1aeb17ef81bccb.zip
Remove Clean trait implementation for hir::TypeBinding
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/mod.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 0d2a2d92725..15038734739 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1884,7 +1884,8 @@ impl<'tcx> Clean<'tcx, GenericArgs> for hir::GenericArgs<'tcx> {
                 })
                 .collect::<Vec<_>>()
                 .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 }
         }
     }
@@ -2250,12 +2251,13 @@ fn clean_maybe_renamed_foreign_item<'tcx>(
     })
 }
 
-impl<'tcx> Clean<'tcx, TypeBinding> for hir::TypeBinding<'tcx> {
-    fn clean(&self, cx: &mut DocContext<'tcx>) -> TypeBinding {
-        TypeBinding {
-            assoc: PathSegment { name: self.ident.name, args: self.gen_args.clean(cx) },
-            kind: self.kind.clean(cx),
-        }
+fn clean_type_binding<'tcx>(
+    type_binding: &hir::TypeBinding<'tcx>,
+    cx: &mut DocContext<'tcx>,
+) -> TypeBinding {
+    TypeBinding {
+        assoc: PathSegment { name: type_binding.ident.name, args: type_binding.gen_args.clean(cx) },
+        kind: type_binding.kind.clean(cx),
     }
 }