about summary refs log tree commit diff
path: root/compiler/rustc_ast_pretty/src/pprust/state.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-03-22 21:42:34 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-03-26 15:30:12 +0300
commit92d802eda669d69481b99139523008df1c456ba8 (patch)
tree5c972a99c50b151718538391b6c858e3238c4379 /compiler/rustc_ast_pretty/src/pprust/state.rs
parent65899c06f117ddac9c8399479ddcdc122c92fddf (diff)
downloadrust-92d802eda669d69481b99139523008df1c456ba8.tar.gz
rust-92d802eda669d69481b99139523008df1c456ba8.zip
expand: Leave traces when expanding `cfg` attributes
Diffstat (limited to 'compiler/rustc_ast_pretty/src/pprust/state.rs')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs
index cdb18179449..3dbfc191f8f 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state.rs
@@ -593,7 +593,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
     }
 
     fn print_attribute_inline(&mut self, attr: &ast::Attribute, is_inline: bool) -> bool {
-        if attr.has_name(sym::cfg_attr_trace) {
+        if attr.has_name(sym::cfg_trace) || attr.has_name(sym::cfg_attr_trace) {
             // It's not a valid identifier, so avoid printing it
             // to keep the printed code reasonably parse-able.
             return false;