about summary refs log tree commit diff
path: root/compiler/rustc_traits/src
diff options
context:
space:
mode:
authorfee1-dead <ent3rm4n@gmail.com>2023-04-16 18:55:38 +0800
committerGitHub <noreply@github.com>2023-04-16 18:55:38 +0800
commiteba419195c7eea19df4366e07ddf074fe54dd00e (patch)
tree273ca45232745c7ad8bdf1d960b803335a2842aa /compiler/rustc_traits/src
parenta5136f14aee8447820a81141631cd6e5919631a5 (diff)
parent4460a1dc28a10cd74a6e5636d6e2cd8c8f06ba4b (diff)
downloadrust-eba419195c7eea19df4366e07ddf074fe54dd00e.tar.gz
rust-eba419195c7eea19df4366e07ddf074fe54dd00e.zip
Rollup merge of #110345 - nnethercote:rm-Super-impls-for-Region, r=compiler-errors
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.

r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_traits/src')
-rw-r--r--compiler/rustc_traits/src/chalk/lowering.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_traits/src/chalk/lowering.rs b/compiler/rustc_traits/src/chalk/lowering.rs
index 2be72879b7b..31eea22d72b 100644
--- a/compiler/rustc_traits/src/chalk/lowering.rs
+++ b/compiler/rustc_traits/src/chalk/lowering.rs
@@ -998,7 +998,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for BoundVarsCollector<'tcx> {
             _ => (),
         };
 
-        r.super_visit_with(self)
+        ControlFlow::Continue(())
     }
 }
 
@@ -1048,7 +1048,7 @@ impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for NamedBoundVarSubstitutor<'a, 'tcx> {
             _ => (),
         };
 
-        r.super_fold_with(self)
+        r
     }
 }
 
@@ -1142,7 +1142,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ParamsSubstitutor<'tcx> {
                 }
             },
 
-            _ => r.super_fold_with(self),
+            _ => r,
         }
     }
 }
@@ -1223,6 +1223,6 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for PlaceholdersCollector {
             _ => (),
         };
 
-        r.super_visit_with(self)
+        ControlFlow::Continue(())
     }
 }