Restructure visit_ty in a more clear way
This commit is contained in:
parent
05b989e16e
commit
81c4d2371a
@ -38,12 +38,15 @@ fn visit_poly_trait_ref(&mut self, t: &'ast PolyTraitRef, m: &'ast TraitBoundMod
|
||||
}
|
||||
|
||||
fn visit_ty(&mut self, t: &'ast Ty) {
|
||||
if let TyKind::BareFn(_) = t.kind {
|
||||
self.current_binders.push(t.id);
|
||||
}
|
||||
visit::walk_ty(self, t);
|
||||
if let TyKind::BareFn(_) = t.kind {
|
||||
self.current_binders.pop();
|
||||
match t.kind {
|
||||
TyKind::BareFn(_) => {
|
||||
self.current_binders.push(t.id);
|
||||
visit::walk_ty(self, t);
|
||||
self.current_binders.pop();
|
||||
}
|
||||
_ => {
|
||||
visit::walk_ty(self, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user