Uh oh!
There was an error while loading. Please reload this page.
Parse nested closure with two consecutive parameter lists properly - #44484
Conversation
rust-highfive
commented
Sep 11, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
petrochenkov
commented
Sep 11, 2017
@bors r+ |
bors
commented
Sep 11, 2017
📌 Commit 31cf11a has been approved by |
bors
commented
Sep 14, 2017
Parse nested closure with two consecutive parameter lists properly This is a followup of #44332. --- Currently, in nightly, this does not compile: ```rust fn main() { let f = |_||x, y| x+y; println!("{}", f(())(1, 2)); // should print 3 } ``` `|_||x, y| x+y` should be parsed as `|_| (|x, y| x+y)`, but the parser didn't accept `||` between `_` and `x`. This patch fixes the problem. r? @petrochenkov
bors
commented
Sep 14, 2017
☀️ Test successful - status-appveyor, status-travis |
This is a followup of #44332.
Currently, in nightly, this does not compile:
|_||x, y| x+yshould be parsed as|_| (|x, y| x+y), but the parser didn't accept||between_andx. This patch fixes the problem.r? @petrochenkov