about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-04-15 09:31:11 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-04-16 09:11:43 +1000
commit4460a1dc28a10cd74a6e5636d6e2cd8c8f06ba4b (patch)
tree38550cb68ec790a32d7bf44b821e3bf769a84bd1 /compiler/rustc_trait_selection/src
parentd558796beb400cceb2a2b8950f35aa518a58a586 (diff)
downloadrust-4460a1dc28a10cd74a6e5636d6e2cd8c8f06ba4b.tar.gz
rust-4460a1dc28a10cd74a6e5636d6e2cd8c8f06ba4b.zip
Remove `TypeSuper{Foldable,Visitable}` impls for `Region`.
These traits exist so that folders/visitors can recurse into types of
interest: binders, types, regions, predicates, and consts. But `Region`
is non-recursive and cannot contain other types of interest, so its
methods in these traits are trivial.

This commit inlines and removes those trivial methods.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs
index 8a203dec86b..ed82b9c0152 100644
--- a/compiler/rustc_trait_selection/src/traits/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/mod.rs
@@ -450,7 +450,7 @@ fn is_impossible_method(tcx: TyCtxt<'_>, (impl_def_id, trait_item_def_id): (DefI
             {
                 return ControlFlow::Break(());
             }
-            r.super_visit_with(self)
+            ControlFlow::Continue(())
         }
         fn visit_const(&mut self, ct: ty::Const<'tcx>) -> ControlFlow<Self::BreakTy> {
             if let ty::ConstKind::Param(param) = ct.kind()