-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
error message when creating a closure and directly calling not very clear #55851
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
To make matters more fun, the following is valid rust code:
It'll be hard to deal with this as it's the parser creating a certain AST that the type checker then chokes on without enough context. We might be able to special case this, but would only feel comfortable if it were a very small amount of code to deal with it. |
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 10, 2019
…twco When encountetring `||{}()`, suggest the likely intended `(||{})()` Fix rust-lang#55851.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 10, 2019
…twco When encountetring `||{}()`, suggest the likely intended `(||{})()` Fix rust-lang#55851.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 10, 2019
…twco When encountetring `||{}()`, suggest the likely intended `(||{})()` Fix rust-lang#55851.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 11, 2019
…twco When encountetring `||{}()`, suggest the likely intended `(||{})()` Fix rust-lang#55851.
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Mar 13, 2019
…twco When encountetring `||{}()`, suggest the likely intended `(||{})()` Fix rust-lang#55851.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 16, 2019
…twco When encountetring `||{}()`, suggest the likely intended `(||{})()` Fix rust-lang#55851.
bors
added a commit
that referenced
this issue
Mar 22, 2019
When encountering `||{}()`, suggest the likely intended `(||{})()` Fix #55851.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating a closure and directly calling it:
(Playground)
Errors:
Which doesn't really hint at what the problem is. The problem is that the closure must be surrounded by
()
- playground:The text was updated successfully, but these errors were encountered: