Fully integrate token collection for additional AST structs

This commit contains miscellaneous changes that don't fit into any of
the other commits in this PR
This commit is contained in:
Aaron Hill
2020-08-21 22:11:41 -04:00
parent 961f18317d
commit 8808dc6abf
4 changed files with 6 additions and 6 deletions

View File

@@ -285,7 +285,7 @@ impl EarlyLintPass for EnumVariantNames {
);
}
}
if item.vis.node.is_pub() {
if item.vis.kind.is_pub() {
let matching = partial_match(mod_camel, &item_camel);
let rmatching = partial_rmatch(mod_camel, &item_camel);
let nchars = mod_camel.chars().count();
@@ -316,7 +316,7 @@ impl EarlyLintPass for EnumVariantNames {
}
}
if let ItemKind::Enum(ref def, _) = item.kind {
let lint = match item.vis.node {
let lint = match item.vis.kind {
VisibilityKind::Public => PUB_ENUM_VARIANT_NAMES,
_ => ENUM_VARIANT_NAMES,
};