Shrink ast::Attribute.
This commit is contained in:
parent
86a0a18179
commit
6e5f90ae46
4 changed files with 9 additions and 9 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue