expand: Do not report cfg_attr
traces on macros as unused attributes
This commit is contained in:
parent
4ac032f857
commit
0ac2801f25
3 changed files with 15 additions and 8 deletions
|
@ -1941,7 +1941,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
|
|||
let attr_name = attr.ident().unwrap().name;
|
||||
// `#[cfg]` and `#[cfg_attr]` are special - they are
|
||||
// eagerly evaluated.
|
||||
if attr_name != sym::cfg && attr_name != sym::cfg_attr {
|
||||
if attr_name != sym::cfg && attr_name != sym::cfg_attr_trace {
|
||||
self.cx.sess.psess.buffer_lint(
|
||||
UNUSED_ATTRIBUTES,
|
||||
attr.span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue