Uh oh!
There was an error while loading. Please reload this page.
Allow multiple solutions in a suggestion - #155
Conversation
emilyalbini
commented
Dec 8, 2018
Also removed a test that was checking for this behavior. r? @killercup |
killercup
commented
Dec 9, 2018
Thanks, this looks good! Can you add a new test with a >1 solutions case? |
emilyalbini
commented
Dec 9, 2018
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. |
zackmdavis
commented
Dec 9, 2018
@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_lintswhere multiple sections of the line needs to be removed:This patch changes the behavior to allow multiple solutions.