-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Only ensure solutions are in the same file in cargo fix #6402
Conversation
Trying this with my local rustc branch doesn't work yet, let me fix it. |
This comment has been minimized.
This comment has been minimized.
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.
Looks good. Ideally, we'd add a test here, too, but that is probably blocked on rust-lang/rust#56645
Co-Authored-By: Pascal Hertleif <killercup@gmail.com>
bb18b2d
to
a9f64b2
Compare
Ok, removed the bump to rustfix 0.4.3. This is ready to be reviewed, even though it's not enough on its own for rust-lang/rust#56645 (needs a fix for rust-lang/rust#53934 before I can fix all the |
@bors: r+ |
📌 Commit a9f64b2 has been approved by |
Only ensure solutions are in the same file in cargo fix This PR changes `cargo fix` to avoid rejecting machine-applicable lints with multiple suggestions. Instead, now it only checks the solutions are in the same file. I don't know how to write a test for this, since no lint in rustc relies on the new behavior and the existing `cargo fix` tests just invoke lints in rustc. Any idea on that would be appreciated. r? @alexcrichton cc @killercup fixes #6401
☀️ Test successful - status-appveyor, status-travis |
This PR changes
cargo fix
to avoid rejecting machine-applicable lints with multiple suggestions. Instead, now it only checks the solutions are in the same file.I don't know how to write a test for this, since no lint in rustc relies on the new behavior and the existing
cargo fix
tests just invoke lints in rustc. Any idea on that would be appreciated.r? @alexcrichton
cc @killercup
fixes #6401