-
Notifications
You must be signed in to change notification settings - Fork 62
Allow multiple solutions in a suggestion #155
Conversation
Also removed a test that was checking for this behavior. r? @killercup |
Thanks, this looks good! Can you add a new test with a >1 solutions case? |
Ok, changed the test suite to use the cached json instead of calling rustc (since it's not possible to do so until the lint is merged into rustc, which is blocked on this) and added a test. |
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.
Thanks!
@pietroalbini @killercup Can we also get a test for multiple distinct suggestions? That is, if I understand correctly, the test added in 4595c3b is using JSON that was generated by calling (I regret the lack of initiative implied by me leaving this mere comment rather than submitting a PR (as it is written, "patch or STFU"), but I'm afraid I don't have time today.) |
At the moment, rustfix discards all the suggestions with more than one solution. This prevent implementing machine-applicable fixes for
unused_lints
where multiple sections of the line needs to be removed:This patch changes the behavior to allow multiple solutions.