-
-
Notifications
You must be signed in to change notification settings - Fork 15k
AST pretty-printer produces invalid syntax for postfix match #124206
Copy link
Copy link
Closed
Labels
A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)C-bugCategory: This is a bug.Category: This is a bug.F-postfix_match`#![feature(postfix_match)]``#![feature(postfix_match)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)C-bugCategory: This is a bug.Category: This is a bug.F-postfix_match`#![feature(postfix_match)]``#![feature(postfix_match)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
No status
As of current nightly,
rustc -Zunpretty=expanded main.rsproduces this:which is not valid Rust syntax.
The correct output would contain
({ 1 } + 1).match { _ => {} }.F-postfix_match`#![feature(postfix_match)]`
tracking issue: #121618