Shrink ast::Attribute.

This commit is contained in:
Nicholas Nethercote 2022-08-11 21:06:11 +10:00
parent 86a0a18179
commit 6e5f90ae46
4 changed files with 9 additions and 9 deletions

View file

@ -74,8 +74,8 @@ impl EarlyLintPass for CrateInMacroDef {
fn is_macro_export(attr: &Attribute) -> bool {
if_chain! {
if let AttrKind::Normal(attr_item, _) = &attr.kind;
if let [segment] = attr_item.path.segments.as_slice();
if let AttrKind::Normal(normal) = &attr.kind;
if let [segment] = normal.item.path.segments.as_slice();
then {
segment.ident.name == sym::macro_export
} else {