Rollup merge of #87389 - Aaron1011:expand-known-attrs, r=wesleywiser
Rename `known_attrs` to `expanded_inert_attrs` and move to rustc_expand There's no need for this to be (untracked) global state.
This commit is contained in:
@@ -754,7 +754,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
||||
}
|
||||
}
|
||||
SyntaxExtensionKind::NonMacroAttr { mark_used } => {
|
||||
self.cx.sess.mark_attr_known(&attr);
|
||||
self.cx.expanded_inert_attrs.mark(&attr);
|
||||
if *mark_used {
|
||||
self.cx.sess.mark_attr_used(&attr);
|
||||
}
|
||||
@@ -1040,7 +1040,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
|
||||
item.visit_attrs(|attrs| {
|
||||
attr = attrs
|
||||
.iter()
|
||||
.position(|a| !self.cx.sess.is_attr_known(a) && !is_builtin_attr(a))
|
||||
.position(|a| !self.cx.expanded_inert_attrs.is_marked(a) && !is_builtin_attr(a))
|
||||
.map(|attr_pos| {
|
||||
let attr = attrs.remove(attr_pos);
|
||||
let following_derives = attrs[attr_pos..]
|
||||
|
||||
Reference in New Issue
Block a user