fix def collector for impl trait

This commit is contained in:
Bastian Kauschke 2020-10-04 22:48:57 +02:00
parent 5296ac6565
commit 8f13705e3b
1 changed files with 4 additions and 4 deletions

View File

@ -239,13 +239,13 @@ impl<'a, 'b> visit::Visitor<'a> for DefCollector<'a, 'b> {
fn visit_ty(&mut self, ty: &'a Ty) {
match ty.kind {
TyKind::MacCall(..) => return self.visit_macro_invoc(ty.id),
TyKind::MacCall(..) => self.visit_macro_invoc(ty.id),
TyKind::ImplTrait(node_id, _) => {
self.create_def(node_id, DefPathData::ImplTrait, ty.span);
let parent_def = self.create_def(node_id, DefPathData::ImplTrait, ty.span);
self.with_parent(parent_def, |this| visit::walk_ty(this, ty));
}
_ => {}
_ => visit::walk_ty(self, ty),
}
visit::walk_ty(self, ty);
}
fn visit_stmt(&mut self, stmt: &'a Stmt) {