diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-03-22 21:42:34 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-03-26 15:30:12 +0300 |
| commit | 92d802eda669d69481b99139523008df1c456ba8 (patch) | |
| tree | 5c972a99c50b151718538391b6c858e3238c4379 /compiler/rustc_ast_pretty/src/pprust/state.rs | |
| parent | 65899c06f117ddac9c8399479ddcdc122c92fddf (diff) | |
| download | rust-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.rs | 2 |
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; |
