Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marcusklaas opened this issue Aug 17, 2015 · 2 comments
Closed
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST

Comments

@marcusklaas
Copy link
Contributor

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?

@steveklabnik
Copy link
Member

/cc @rust-lang/compiler

@steveklabnik steveklabnik added the A-syntaxext Area: Syntax extensions label Sep 3, 2015
@nrc nrc added A-parser Area: The lexing & parsing of Rust source code to an AST and removed A-syntaxext Area: Syntax extensions labels Sep 3, 2015
@nrc
Copy link
Member

nrc commented Nov 20, 2016

Fixed by 49772fb (#37412).

@nrc nrc closed this as completed Nov 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST
Projects
None yet
Development

No branches or pull requests

3 participants