fix(script_plguins): rustc_ast::ast::AttrKind::Normal fields are now boxed

<https://github.com/rust-lang/rust/pull/100441>
This commit is contained in:
yvt 2022-10-12 12:45:41 +09:00
parent 52ebde8e16
commit 3fd4fd0388

View file

@ -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
)
})
}