mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
97872b792c
Revert "Teach parser to understand fake anonymous enum syntax" and related commits anonymous enum types are currently ambiguous in positions like: * `|` operator: `a as fn() -> B | C` * closure args: `|_: as fn() -> A | B` I first tried to thread around `RecoverAnonEnum` into all these positions, but the resulting complexity in the compiler is IMO not worth it, or at least worth a bit more thinking time. In the mean time, let's revert this syntax for now, so we can go back to the drawing board. Fixes #107461 cc: `@estebank` `@cjgillot` #106960 --- ### Squashed revert commits: Revert "review comment: Remove AST AnonTy" This reverts commit020cca8d36. Revert "Ensure macros are not affected" This reverts commit12d18e4031. Revert "Emit fewer errors on patterns with possible type ascription" This reverts commitc847a01a3b. Revert "Teach parser to understand fake anonymous enum syntax" This reverts commit2d82420665.