Refactor counting methods

This commit is contained in:
varkor
2018-05-27 20:37:52 +01:00
parent 3bcb006fd9
commit 8bccfe7a52
8 changed files with 29 additions and 36 deletions

View File

@@ -492,12 +492,12 @@ pub fn walk_ty_param_bound<'a, V: Visitor<'a>>(visitor: &mut V, bound: &'a TyPar
pub fn walk_generic_param<'a, V: Visitor<'a>>(visitor: &mut V, param: &'a GenericParam) {
match param.kind {
GenericParamKind::Lifetime { ref bounds, ref lifetime, .. } => {
GenericParamKind::Lifetime { ref bounds, ref lifetime } => {
visitor.visit_ident(param.ident);
walk_list!(visitor, visit_lifetime, bounds);
walk_list!(visitor, visit_attribute, param.attrs.iter());
}
GenericParamKind::Type { ref bounds, ref default, .. } => {
GenericParamKind::Type { ref bounds, ref default } => {
visitor.visit_ident(t.ident);
walk_list!(visitor, visit_ty_param_bound, bounds);
walk_list!(visitor, visit_ty, default);