-
Notifications
You must be signed in to change notification settings - Fork 1.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
Migrate some rules from Fix::unspecified
#4587
Conversation
@@ -94,7 +94,7 @@ fn duplicate_handler_exceptions<'a>( | |||
); | |||
if checker.patch(diagnostic.kind.rule()) { | |||
#[allow(deprecated)] | |||
diagnostic.set_fix(Fix::unspecified(Edit::range_replacement( | |||
diagnostic.set_fix(Fix::maybe_correct(Edit::range_replacement( |
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.
Is there a specific rule to follow when changing to safe
or maybe_correct
, right now I just went off the issue description where it might introduce semantic changes
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.
fyi the names have changed per #4184 (comment)
The meaning for each applicability level is documented in the Applicability
enum
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.
Yeah it makes sense now.
Could you remove the |
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
Fix::unspecified
to Fix::safe
or Fix::suggested
@MichaReiser Do let me know if the choices made here for safe and suggested are correct. Marked this PR ready for review |
I'll take a look at this tonight. |
Reviewed these choices and they look reasonable to me based on the definitions. |
Fix::unspecified
to Fix::safe
or Fix::suggested
Fix::unspecified
This PR aims to migrate
unspecified
code tosafe
ormaybe_correct
Refers: #4184