about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-06-01 09:38:07 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-06-08 09:22:23 +1000
commit28be201d2f23435e3ab3a21cc52030871a5ec04c (patch)
tree28980693f44320c199cf7ecc0e638130a499277d
parent465d198c74537d1b33b3bafa6a19676ee22d125d (diff)
downloadrust-28be201d2f23435e3ab3a21cc52030871a5ec04c.tar.gz
rust-28be201d2f23435e3ab3a21cc52030871a5ec04c.zip
Use `super_visit_with` in a couple of `visit_binder` methods.
Because it's equivalent but simpler to what's currently there.
-rw-r--r--compiler/rustc_infer/src/infer/opaque_types.rs2
-rw-r--r--compiler/rustc_middle/src/ty/fold.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/opaque_types.rs b/compiler/rustc_infer/src/infer/opaque_types.rs
index 92c0ed84057..00b61874a50 100644
--- a/compiler/rustc_infer/src/infer/opaque_types.rs
+++ b/compiler/rustc_infer/src/infer/opaque_types.rs
@@ -470,7 +470,7 @@ where
         &mut self,
         t: &ty::Binder<'tcx, T>,
     ) -> ControlFlow<Self::BreakTy> {
-        t.as_ref().skip_binder().visit_with(self);
+        t.super_visit_with(self);
         ControlFlow::CONTINUE
     }
 
diff --git a/compiler/rustc_middle/src/ty/fold.rs b/compiler/rustc_middle/src/ty/fold.rs
index c995ea965af..5cf40ad3b8e 100644
--- a/compiler/rustc_middle/src/ty/fold.rs
+++ b/compiler/rustc_middle/src/ty/fold.rs
@@ -514,7 +514,7 @@ impl<'tcx> TyCtxt<'tcx> {
                 t: &Binder<'tcx, T>,
             ) -> ControlFlow<Self::BreakTy> {
                 self.outer_index.shift_in(1);
-                let result = t.as_ref().skip_binder().visit_with(self);
+                let result = t.super_visit_with(self);
                 self.outer_index.shift_out(1);
                 result
             }