Ignore spans when comparing expressions

This commit is contained in:
Oliver Schneider
2018-07-15 00:00:27 +02:00
parent 06d6710147
commit 1e9f076254
13 changed files with 86 additions and 53 deletions

View File

@@ -44,7 +44,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
impl EnumGlobUse {
fn lint_item(&self, cx: &LateContext, item: &Item) {
if item.vis.node == VisibilityKind::Public {
if item.vis.node.is_pub() {
return; // re-exports are fine
}
if let ItemUse(ref path, UseKind::Glob) = item.node {