-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Names of function types shouldn't allow parameter names #731
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
Comments
I think this is intentional -- you can optionally include them, as documentation, but don't have to. |
I think they might be required for right now... at least, I seem to recall having problems with leaving them out before. |
I'm pretty sure they are optional currently. See https://github.com/graydon/rust/blob/master/src/comp/syntax/parse/parser.rs#L256 |
At least in native modules, this doesn't seem to work. I'm trying to make this compile:
It fails with "error: expecting ident." |
Ah, that's a native function item, not a type. Yes, they seem to be required there. I think Graydon considered them desirable for documentation there. I actually agree it seems sane to require them. |
Yeah, I vote for keeping them allowed. |
I think consensus is WONTFIX. |
Added clearification that closures are refered to lambdas
* Fix vector/scalar analysis * add test * fix test * no clang format
let fn(int x) a = f
is a valid declaration but the x is useless.The text was updated successfully, but these errors were encountered: