Skip to content

syntax::ast::Expr_::ExprClosure should have an Expr instead of Block #27872

Closed
@marcusklaas

Description

@marcusklaas

Currently closures of the form |a| a * a are very hard to pretty-print since a * a is wrapped in an ast::Block, even though there are no curly braces.

Match arms contain general sub-expressions, as well.

Is there any technical reason why they are treated differently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions