Skip to content

Commit ca7585a

Browse files
committed
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.
1 parent 28be201 commit ca7585a

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

compiler/rustc_middle/src/ty/structural_impls.rs

-8
Original file line numberDiff line numberDiff line change
@@ -868,17 +868,9 @@ impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for ty::EarlyBinder<T> {
868868
self.try_map_bound(|ty| ty.try_fold_with(folder))
869869
}
870870

871-
fn try_fold_with<F: FallibleTypeFolder<'tcx>>(self, folder: &mut F) -> Result<Self, F::Error> {
872-
self.try_map_bound(|ty| ty.try_fold_with(folder))
873-
}
874-
875871
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
876872
self.as_ref().0.visit_with(visitor)
877873
}
878-
879-
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
880-
self.as_ref().0.visit_with(visitor)
881-
}
882874
}
883875

884876
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for ty::Binder<'tcx, T> {

0 commit comments

Comments
 (0)