Remove dead TypeFoldable::visit_tys_shallow
method
This commit is contained in:
parent
07b37cf791
commit
f6e6a15f07
1 changed files with 0 additions and 14 deletions
|
@ -142,20 +142,6 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
|
|||
fn still_further_specializable(&self) -> bool {
|
||||
self.has_type_flags(TypeFlags::STILL_FURTHER_SPECIALIZABLE)
|
||||
}
|
||||
|
||||
/// A visitor that does not recurse into types, works like `fn walk_shallow` in `Ty`.
|
||||
fn visit_tys_shallow(&self, visit: impl FnMut(Ty<'tcx>) -> ControlFlow<()>) -> ControlFlow<()> {
|
||||
pub struct Visitor<F>(F);
|
||||
|
||||
impl<'tcx, F: FnMut(Ty<'tcx>) -> ControlFlow<()>> TypeVisitor<'tcx> for Visitor<F> {
|
||||
type BreakTy = ();
|
||||
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<()> {
|
||||
self.0(ty)
|
||||
}
|
||||
}
|
||||
|
||||
self.visit_with(&mut Visitor(visit))
|
||||
}
|
||||
}
|
||||
|
||||
impl TypeFoldable<'tcx> for hir::Constness {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue