Also fix if in else
This commit is contained in:
@@ -2172,17 +2172,13 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
||||
attr.span,
|
||||
errors::MacroExport::TooManyItems,
|
||||
);
|
||||
} else {
|
||||
if meta_item_list[0].name_or_empty() != sym::local_inner_macros {
|
||||
self.tcx.emit_node_span_lint(
|
||||
INVALID_MACRO_EXPORT_ARGUMENTS,
|
||||
hir_id,
|
||||
meta_item_list[0].span(),
|
||||
errors::MacroExport::UnknownItem {
|
||||
name: meta_item_list[0].name_or_empty(),
|
||||
},
|
||||
);
|
||||
}
|
||||
} else if meta_item_list[0].name_or_empty() != sym::local_inner_macros {
|
||||
self.tcx.emit_node_span_lint(
|
||||
INVALID_MACRO_EXPORT_ARGUMENTS,
|
||||
hir_id,
|
||||
meta_item_list[0].span(),
|
||||
errors::MacroExport::UnknownItem { name: meta_item_list[0].name_or_empty() },
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// special case when `#[macro_export]` is applied to a macro 2.0
|
||||
|
||||
Reference in New Issue
Block a user