-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Incorrect bracket is pointed to for return type in closure #50085
Comments
I did some poking around and it looks like it doesn't specifically involve closures. From what I saw, there are three possibly-distinct cases that trigger it, all with slightly different error messages: 1fn main() {
let a = { { true } true };
}
2fn foo() {
let a = { { true } true };
}
3fn foo() -> () {
let a = { { true } true };
}
It doesn't seem to happen with any other return type. |
CC #46720 |
Current output:
|
@estebank: do we have test cases for this sort of problem? It might be worth adding the test in the issue. |
@varkor we do, can try and find them for you, but I'm 99% sure we already cover these cases. |
I thought it was likely we did. They should be sufficient. |
Gives the error:
The return type of
main
is referenced, which is wrong — but really the problem is that there are two consecutive expressions that are not separated by a semicolon. It would be good to have an improvement in either respect, though.The text was updated successfully, but these errors were encountered: