-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Change how edition based future compatibility warnings are handled #86330
Conversation
4e75ec9
to
c818e47
Compare
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.
Nice! This looks good to me.
But since I'm not on the compiler team or compiler-contributors, I'll leave the final approval to someone who is:
r? @estebank
@bors r+ |
📌 Commit 44d86a9e1d7515b3858b0939a686dd4034d3ecb2 has been approved by |
44d86a9
to
e7adb02
Compare
@bors r=nikomatsakis |
📌 Commit e7adb02 has been approved by |
…tsakis Change how edition based future compatibility warnings are handled This fixes rust-lang#85894 by updating how future compatibility lints work. This makes it more apparent that future compatibility warnings can happen for several different reasons. For now `FutureCompatibilityReasons` are limited to three reasons, but we can easily add more. This also updates the generated warning for FCW's that signal code that will error in a future edition. This makes the diagnostics between FCWs at edition boundaries more distinct from those not happening at an edition boundary. r? `@m-ou-se`
☔ The latest upstream changes (presumably #86574) made this pull request unmergeable. Please resolve the merge conflicts. |
e7adb02
to
51f223e
Compare
@JohnTitor I've addressed the clippy test. This should be ready for bors again. |
Thanks! |
📌 Commit 51f223e has been approved by |
…tsakis Change how edition based future compatibility warnings are handled This fixes rust-lang#85894 by updating how future compatibility lints work. This makes it more apparent that future compatibility warnings can happen for several different reasons. For now `FutureCompatibilityReasons` are limited to three reasons, but we can easily add more. This also updates the generated warning for FCW's that signal code that will error in a future edition. This makes the diagnostics between FCWs at edition boundaries more distinct from those not happening at an edition boundary. r? `@m-ou-se`
Rollup of 5 pull requests Successful merges: - rust-lang#86330 (Change how edition based future compatibility warnings are handled) - rust-lang#86513 (Rustdoc: Do not list impl when trait has doc(hidden)) - rust-lang#86592 (Use `#[non_exhaustive]` where appropriate) - rust-lang#86608 (chore(rustdoc): remove unused members of RenderType) - rust-lang#86624 (Update compiler-builtins) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Temporarily disable future_incompat tests. The `array_into_iter` lint is no longer future-breaking (via rust-lang/rust#86330), so these tests won't work anymore. This disables the tests until rust-lang/rust#86478 is merged to provide a way to start testing again.
…omatsakis Only include lint in future_incompatible lint group if not an edition lint A follow up to rust-lang#86330 - this only includes lints annotated with `FutureIncompatibleInfo` in the `future_incompatibile` lint group if the future compatibility is not tied to an edition. We probably want to rename `FutureIncompatibleInfo` to something else since this type is now used to indicate future breakages of all kinds (even those that happen in editions). I'd prefer to do that in a separate PR though. r? `@nikomatsakis`
Add -Zfuture-incompat-test to assist with testing future-incompat reports. This adds a `-Zfuture-incompat-test` cli flag to assist with testing future-incompatible reports. This flag causes all lints to be treated as a future-incompatible lint, and will emit a report for them. This is being added so that Cargo's testsuite can reliably test the reporting infrastructure. Right now, Cargo relies on using array_into_iter as a test subject. Since the breaking "future incompatible" lints are never intended to last forever, this means Cargo's testsuite would always need to keep changing to choose different lints (for example, rust-lang#86330 proposed dropping that moniker for array_into_iter). With this flag, Cargo's tests can trigger any lint and check for the report.
Add -Zfuture-incompat-test to assist with testing future-incompat reports. This adds a `-Zfuture-incompat-test` cli flag to assist with testing future-incompatible reports. This flag causes all lints to be treated as a future-incompatible lint, and will emit a report for them. This is being added so that Cargo's testsuite can reliably test the reporting infrastructure. Right now, Cargo relies on using array_into_iter as a test subject. Since the breaking "future incompatible" lints are never intended to last forever, this means Cargo's testsuite would always need to keep changing to choose different lints (for example, rust-lang#86330 proposed dropping that moniker for array_into_iter). With this flag, Cargo's tests can trigger any lint and check for the report.
Add -Zfuture-incompat-test to assist with testing future-incompat reports. This adds a `-Zfuture-incompat-test` cli flag to assist with testing future-incompatible reports. This flag causes all lints to be treated as a future-incompatible lint, and will emit a report for them. This is being added so that Cargo's testsuite can reliably test the reporting infrastructure. Right now, Cargo relies on using array_into_iter as a test subject. Since the breaking "future incompatible" lints are never intended to last forever, this means Cargo's testsuite would always need to keep changing to choose different lints (for example, rust-lang#86330 proposed dropping that moniker for array_into_iter). With this flag, Cargo's tests can trigger any lint and check for the report.
This fixes #85894 by updating how future compatibility lints work. This makes it more apparent that future compatibility warnings can happen for several different reasons.
For now
FutureCompatibilityReasons
are limited to three reasons, but we can easily add more.This also updates the generated warning for FCW's that signal code that will error in a future edition. This makes the diagnostics between FCWs at edition boundaries more distinct from those not happening at an edition boundary.
r? @m-ou-se