expand: Leave traces when expanding cfg_attr attributes

This commit is contained in:
Vadim Petrochenkov 2025-03-14 20:34:43 +03:00
parent 9bad8ac498
commit 9dd4e4cad1
10 changed files with 136 additions and 19 deletions

View file

@ -16,7 +16,7 @@ use rustc_span::{Span, Symbol, sym};
use crate::{errors, parse_in};
pub fn check_attr(psess: &ParseSess, attr: &Attribute) {
if attr.is_doc_comment() {
if attr.is_doc_comment() || attr.has_name(sym::cfg_attr_trace) {
return;
}