Skip to content

Commit 86edddb

Browse files
committed
parse attrs from inside of macro bodies
1 parent 279ee03 commit 86edddb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

compiler/rustc_passes/src/check_attr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1892,11 +1892,12 @@ impl<'tcx> Visitor<'tcx> for CheckAttrVisitor<'tcx> {
18921892
// Historically we've run more checks on non-exported than exported macros,
18931893
// so this lets us continue to run them while maintaining backwards compatibility.
18941894
// In the long run, the checks should be harmonized.
1895-
if let ItemKind::Macro(_, macro_def, _) = item.kind {
1895+
if let ItemKind::Macro(ident, macro_def, _) = item.kind {
18961896
let def_id = item.owner_id.to_def_id();
18971897
if macro_def.macro_rules && !find_attr!(self.tcx, def_id, MacroExport { .. }) {
18981898
check_non_exported_macro_for_invalid_attrs(self.tcx, item);
18991899
}
1900+
intravisit::walk_ident(self, ident);
19001901
}
19011902

19021903
let target = Target::from_item(item);

0 commit comments

Comments
 (0)