-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: add bool_to_enum assist for parameters #17467
Conversation
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.
Okay one more simplification, I didn't realize the code generally assumes a top level ident pattern only, so using ancestor is wrong. We want to check if the ident pattern is the top most patterns in the statement/param.
Also could you squash the commits? There is a lot of very small commits that I don't think add any value here
@@ -784,7 +880,6 @@ fn main() { | |||
|
|||
#[test] | |||
fn local_variable_non_ident_pat() { | |||
cov_mark::check!(not_applicable_in_non_ident_pat); |
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.
Not entirely sure, but I don't think this should ever hit anymore.
Thanks! |
☀️ Test successful - checks-actions |
Summary
This PR adds parameter support for
bool_to_enum
assists. Essentially, the assist can now transform this:To this,
Thanks to @/davidbarsky for the test skeleton (:
Closes #17400