We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
TypeFoldable::visit_tys_shallow
1 parent 07b37cf commit f6e6a15Copy full SHA for f6e6a15
compiler/rustc_middle/src/ty/fold.rs
@@ -142,20 +142,6 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
142
fn still_further_specializable(&self) -> bool {
143
self.has_type_flags(TypeFlags::STILL_FURTHER_SPECIALIZABLE)
144
}
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
159
160
161
impl TypeFoldable<'tcx> for hir::Constness {
0 commit comments