about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/ty.rs
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2024-02-24 17:22:28 -0500
committerJason Newcomb <jsnewcomb@pm.me>2024-03-05 13:28:15 -0500
commitbe9b125d4180126f259d392fdf72ddb33e63013a (patch)
treea8766be6e1360cde6b9bfca49898116ab8c200d6 /compiler/rustc_ty_utils/src/ty.rs
parent5abfb3775da61ed9059c6efa3f9bec5b86b67c7a (diff)
downloadrust-be9b125d4180126f259d392fdf72ddb33e63013a.tar.gz
rust-be9b125d4180126f259d392fdf72ddb33e63013a.zip
Convert `TypeVisitor` and `DefIdVisitor` to use `VisitorResult`
Diffstat (limited to 'compiler/rustc_ty_utils/src/ty.rs')
-rw-r--r--compiler/rustc_ty_utils/src/ty.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs
index b725eda33ce..48d9a5e27b7 100644
--- a/compiler/rustc_ty_utils/src/ty.rs
+++ b/compiler/rustc_ty_utils/src/ty.rs
@@ -174,17 +174,13 @@ struct ImplTraitInTraitFinder<'a, 'tcx> {
 }
 
 impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ImplTraitInTraitFinder<'_, 'tcx> {
-    fn visit_binder<T: TypeVisitable<TyCtxt<'tcx>>>(
-        &mut self,
-        binder: &ty::Binder<'tcx, T>,
-    ) -> std::ops::ControlFlow<Self::BreakTy> {
+    fn visit_binder<T: TypeVisitable<TyCtxt<'tcx>>>(&mut self, binder: &ty::Binder<'tcx, T>) {
         self.depth.shift_in(1);
-        let binder = binder.super_visit_with(self);
+        binder.super_visit_with(self);
         self.depth.shift_out(1);
-        binder
     }
 
-    fn visit_ty(&mut self, ty: Ty<'tcx>) -> std::ops::ControlFlow<Self::BreakTy> {
+    fn visit_ty(&mut self, ty: Ty<'tcx>) {
         if let ty::Alias(ty::Projection, unshifted_alias_ty) = *ty.kind()
             && let Some(
                 ty::ImplTraitInTraitData::Trait { fn_def_id, .. }