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)]`
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
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: