diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-01 10:25:56 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-08 09:22:23 +1000 |
| commit | ca7585ab9a5c770eacf22dfcdbbe1ad72d8eab34 (patch) | |
| tree | 253d5bcf5db491b85b637887d3c6bc926dd46c99 /compiler | |
| parent | 28be201d2f23435e3ab3a21cc52030871a5ec04c (diff) | |
| download | rust-ca7585ab9a5c770eacf22dfcdbbe1ad72d8eab34.tar.gz rust-ca7585ab9a5c770eacf22dfcdbbe1ad72d8eab34.zip | |
Remove `EarlyBinder::{try_fold_with,visit_with}`.
For most types the default impls of these methods are good enough, and `EarlyBinder` is one such type.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/structural_impls.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index adb4766492e..1390907d805 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -868,17 +868,9 @@ impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for ty::EarlyBinder<T> { self.try_map_bound(|ty| ty.try_fold_with(folder)) } - fn try_fold_with<F: FallibleTypeFolder<'tcx>>(self, folder: &mut F) -> Result<Self, F::Error> { - self.try_map_bound(|ty| ty.try_fold_with(folder)) - } - fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> { self.as_ref().0.visit_with(visitor) } - - fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> { - self.as_ref().0.visit_with(visitor) - } } impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for ty::Binder<'tcx, T> { |
