Skip to content

Commit f6e6a15

Browse files
Remove dead TypeFoldable::visit_tys_shallow method
1 parent 07b37cf commit f6e6a15

File tree

1 file changed

+0
-14
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+0
-14
lines changed

compiler/rustc_middle/src/ty/fold.rs

-14
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,6 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
142142
fn still_further_specializable(&self) -> bool {
143143
self.has_type_flags(TypeFlags::STILL_FURTHER_SPECIALIZABLE)
144144
}
145-
146-
/// A visitor that does not recurse into types, works like `fn walk_shallow` in `Ty`.
147-
fn visit_tys_shallow(&self, visit: impl FnMut(Ty<'tcx>) -> ControlFlow<()>) -> ControlFlow<()> {
148-
pub struct Visitor<F>(F);
149-
150-
impl<'tcx, F: FnMut(Ty<'tcx>) -> ControlFlow<()>> TypeVisitor<'tcx> for Visitor<F> {
151-
type BreakTy = ();
152-
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<()> {
153-
self.0(ty)
154-
}
155-
}
156-
157-
self.visit_with(&mut Visitor(visit))
158-
}
159145
}
160146

161147
impl TypeFoldable<'tcx> for hir::Constness {

0 commit comments

Comments
 (0)