Handle generic parameters.
This commit is contained in:
parent
cdf78073c5
commit
05812df603
25 changed files with 171 additions and 224 deletions
|
@ -562,10 +562,6 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) {
|
|||
walk_generics(visitor, generics);
|
||||
walk_list!(visitor, visit_param_bound, bounds);
|
||||
}
|
||||
ItemKind::ImplTraitPlaceholder(ImplTraitPlaceholder { bounds }) => {
|
||||
visitor.visit_id(item.hir_id());
|
||||
walk_list!(visitor, visit_param_bound, bounds);
|
||||
}
|
||||
ItemKind::Enum(ref enum_definition, ref generics) => {
|
||||
visitor.visit_generics(generics);
|
||||
// `visit_enum_def()` takes care of visiting the `Item`'s `HirId`.
|
||||
|
@ -674,13 +670,10 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) {
|
|||
TyKind::Path(ref qpath) => {
|
||||
visitor.visit_qpath(qpath, typ.hir_id, typ.span);
|
||||
}
|
||||
TyKind::OpaqueDef(item_id, lifetimes) => {
|
||||
TyKind::OpaqueDef(item_id, lifetimes, _in_trait) => {
|
||||
visitor.visit_nested_item(item_id);
|
||||
walk_list!(visitor, visit_generic_arg, lifetimes);
|
||||
}
|
||||
TyKind::ImplTraitInTrait(item_id) => {
|
||||
visitor.visit_nested_item(item_id);
|
||||
}
|
||||
TyKind::Array(ref ty, ref length) => {
|
||||
visitor.visit_ty(ty);
|
||||
visitor.visit_array_length(length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue