-
Notifications
You must be signed in to change notification settings - Fork 13.7k
refactor(parse): separate self parameter parsing from general parameter parsing #145088
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
base: master
Are you sure you want to change the base?
Conversation
r? @nnethercote rustbot has assigned @nnethercote. Use |
This comment has been minimized.
This comment has been minimized.
params.push(self_param); | ||
} | ||
|
||
let (mut reamining_params, _) = self.parse_paren_comma_seq(|p| { |
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.
s/reamining_params/remaining_params/
Please fix the errors, thanks! @rustbot author |
Reminder, once the PR becomes ready for a review, use |
This comment has been minimized.
This comment has been minimized.
(please also squash into one commit afterwards, thanks) |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@rustbot ready |
|
||
let (mut params, _) = self.parse_paren_comma_seq(|p| { | ||
//Parse the self parameter as first parameter |
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.
//Parse the self parameter as first parameter | |
// Parse the self parameter as first parameter |
|
||
let (mut params, _) = self.parse_paren_comma_seq(|p| { | ||
//Parse the self parameter as first parameter | ||
if let Some(mut self_param) = self.parse_self_param()?{ |
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.
if let Some(mut self_param) = self.parse_self_param()?{ | |
if let Some(mut self_param) = self.parse_self_param()? { |
let (mut params, _) = self.parse_paren_comma_seq(|p| { | ||
//Parse the self parameter as first parameter | ||
if let Some(mut self_param) = self.parse_self_param()?{ | ||
let self_attrs = self.parse_outer_attributes()?; |
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.
Having the parse_outer_attributes
after the parse_self_param
is suspicious.
Still more CI failures to be fixed. @rustbot author |
☔ The latest upstream changes (presumably #145423) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes #144206
The changes-:
Moves self parameter parsing out of parse_param_general and into parse_fn_params
for better separation of concerns. This removes the first_param boolean and its
branching logic while maintaining identical behavior.
Benefits:
No behavioral changes introduced.