about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-03-11 13:30:51 +0100
committerGitHub <noreply@github.com>2025-03-11 13:30:51 +0100
commitc054bac89a0d460feb51825cf0cedbd1a6056cfc (patch)
tree3d4423e11ce103c792975ad981826c377ed7a029 /compiler/rustc_hir_analysis/src
parent95d9ade39daf7227af84a5f68bb47f47bdaada87 (diff)
parent279377f87aa1871e1011366b6cf997cfa24e3d65 (diff)
downloadrust-c054bac89a0d460feb51825cf0cedbd1a6056cfc.tar.gz
rust-c054bac89a0d460feb51825cf0cedbd1a6056cfc.zip
Rollup merge of #138063 - compiler-errors:improve-attr-unpretty, r=jdonszelmann
Improve `-Zunpretty=hir` for parsed attrs

0. Rename `print_something` to `should_render` to make it distinct from `print_attribute` in that it doesn't print anything, it's just a way to probe if a type renders anything.
1. Fixes a few bugs in the `PrintAttribute` derive. Namely, the `__printed_anything` variable was entangled with the `should_render` call, leading us to always render field names but never render commas.
2. Remove the outermost `""` from the attr.
3. Debug print `Symbol`s. I know that this is redundant for some parsed attributes, but there's no good way to distinguish symbols that are ident-like and symbols which are cooked string literals. We could perhaps *conditionally* to fall back to a debug printing if the symbol doesn't match an ident? But seems like overkill.

Based on #138060, only review the commits not in that one.
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
0 files changed, 0 insertions, 0 deletions