Postfix yield is pretty-printed with too many parentheses #139395
Labels
A-pretty
Area: Pretty printing (including `-Z unpretty`)
C-bug
Category: This is a bug.
F-coroutines
`#![feature(coroutines)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The output from
rustc --edition=2024 -Zunpretty=expanded main.rs
is:The correct output would have
{}.yield.yield
instead of({}.yield).yield
. The pretty-printer is inserting parentheses that do not need to be there, as if the inner yield were prefix yield:(yield {}).yield
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: