-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rework value parameter parsing #3040
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
Conversation
- `Fn__(...)` parameters with idents/patterns no longer parse - Trait function parameters with arbitrary patterns parse - Trait function parameters without idents/patterns no longer parse - `fn(...)` parameters no longer parse with patterns other than a single ident
| @@ -1 +1 @@ | |||
| type F = Box<Fn(a: i32, &b: &i32, &mut c: &i32, ())>; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, this was never allowed in the first place? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add some code to test all code which should compile with rustc too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be a good catch-all, but I think a lot of existing tests won't compile due to undefined symbols, rather than syntax errors.
|
bors r+ |
3040: Rework value parameter parsing r=matklad a=tobz1000 Fixes #2847. - `Fn__(...)` parameters with idents/patterns no longer parse - Trait function parameters with arbitrary patterns parse - Trait function parameters without idents/patterns no longer parse - `fn(...)` parameters no longer parse with patterns other than a single ident __Question__: The pre-existing test `param_list_opt_patterns` has been kept as-is, although the name no longer makes sense (it's testing `Fn__(...)` params, which aren't allowed patterns any more). What would be best to do about this? Co-authored-by: Toby Dimmick <tobydimmick@pm.me>
Build succeeded
|
Fixes #2847.
Fn__(...)parameters with idents/patterns no longer parsefn(...)parameters no longer parse with patterns other than a single identQuestion: The pre-existing test
param_list_opt_patternshas been kept as-is, although the name no longer makes sense (it's testingFn__(...)params, which aren't allowed patterns any more). What would be best to do about this?