We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cfg
1 parent 8787a12 commit 9b9aae8Copy full SHA for 9b9aae8
src/libsyntax/config.rs
@@ -62,12 +62,16 @@ impl<'a> StripUnconfigured<'a> {
62
};
63
64
if attr::cfg_matches(self.config, &cfg, self.sess, self.features) {
65
- self.process_cfg_attr(respan(mi.span, ast::Attribute_ {
+ let inner_attr = respan(mi.span, ast::Attribute_ {
66
id: attr::mk_attr_id(),
67
style: attr.node.style,
68
value: mi.clone(),
69
is_sugared_doc: false,
70
- }))
+ });
71
+ if attr::is_used(&attr) {
72
+ attr::mark_used(&inner_attr);
73
+ }
74
+ self.process_cfg_attr(inner_attr)
75
} else {
76
None
77
}
0 commit comments