Skip to content

Commit

Permalink
fix(script_plguins): rustc_ast::ast::AttrKind::Normal fields are no…
Browse files Browse the repository at this point in the history
  • Loading branch information
yvt committed Oct 16, 2022
1 parent 52ebde8 commit 3fd4fd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/script_plugins/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ fn has_lint_attr(sym: &Symbols, attrs: &[Attribute], name: Symbol) -> bool {
attrs.iter().any(|attr| {
matches!(
&attr.kind,
AttrKind::Normal(attr_item, _)
if attr_item.path.segments.len() == 2 &&
attr_item.path.segments[0].ident.name == sym.unrooted_must_root_lint &&
attr_item.path.segments[1].ident.name == name
AttrKind::Normal(normal)
if normal.item.path.segments.len() == 2 &&
normal.item.path.segments[0].ident.name == sym.unrooted_must_root_lint &&
normal.item.path.segments[1].ident.name == name
)
})
}
Expand Down

0 comments on commit 3fd4fd0

Please sign in to comment.