-
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
Update array_into_iter lint for 1.53 and edition changes. #85682
Conversation
@Aaron1011 The |
This comment has been minimized.
This comment has been minimized.
4830d39
to
573a134
Compare
This now produces the message
which isn't entirely accurate. It will not become a hard error per se, it will change meaning. Should this use something other than |
This comment has been minimized.
This comment has been minimized.
@m-ou-se The message about a hard error is emitted for all future compare lints - I can add a way to customize it on a per-lint basis. Whether or not we still want the Now that the behavior is edition gated, upstream dependencies will continue to work (since they'll be on the 2015 or 2018 edition). I think there's no longer any need to notify users about such crates in the report - while it would be nice to minimize the number of crate's relying on the impl method resolution hack, I don't think this justifies showing a notification to authors of unrelated crates. I think we can now remove the |
I think it might be ok to land the lint with the slightly inaccurate note about the edition and fix it on a separate PR. I didn't notice any 2021 edition tests to check that the lint doesn't trigger when it shouldn't. I don't expect them to be broken, but I feel more at ease when we have tests for any potential regression. |
Sounds like the Here, the comment suggests that future_incompatible lints with an edition set are 'not future incompatible': rust/compiler/rustc_middle/src/lint.rs Lines 275 to 280 in 7350f65
But here, it uses the 'standard message' in that case, which contains the "is being phased out" and "it will become a hard error" text: rust/compiler/rustc_middle/src/lint.rs Lines 365 to 366 in 7350f65
That should be easy to change. However, then the question remains: Do we consider these things 'future incompatibility lints' or not? Same question for the I'm not exactly sure what this
@Aaron1011 can you tell me what I should do with that test? That's currently blocking this PR from passing the CI tests. |
I'm wondering if it's worth backporting this. Otherwise, 1.53 will ship with |
573a134
to
a8614bc
Compare
@Aaron1011 I have removed that test to unblock this.
That already exists here:
I have removed it for now. Once we have a way to change/disable the 'hard error' message, we should add it to make sure it becomes part of |
This needs to get merged or at least approved in the next ~24 hours, ideally, if we're to backport it to beta, but I myself don't have enough time to investigate/review it. I suspect that means that 1.53 will not have the nice lint, unfortunately, but that doesn't seem too bad. We're always improving diagnostics anyway. |
unilaterally declining for beta-backport to 1.53. Its not critical for this to get in there; the inconsistency noted by @m-ou-se isn't that bad (i.e. its not fantastic for a diagnostic to claim an implementation doesn't exist when it in fact does, but that scenario is still way better than a diagnostic to claim an implementation does exist when it in fact does not.) |
@bors r+ |
📌 Commit a8614bc has been approved by |
…tsakis Update array_into_iter lint for 1.53 and edition changes. This updates the array_into_iter lint for Rust 1.53 and the edition changes. See rust-lang#84513 r? `@estebank`
a8614bc
to
3a92598
Compare
Apparently |
Alright, tests pass again after rebasing. Let's try again. @bors r=nikomatsakis |
📌 Commit 3a92598a582607fc59676715408e80c52d2b8d12 has been approved by |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
☔ The latest upstream changes (presumably #86627) made this pull request unmergeable. Please resolve the merge conflicts. |
3a92598
to
dbdf7c7
Compare
📌 Commit dbdf7c7 has been approved by |
☀️ Test successful - checks-actions |
This updates the array_into_iter lint for Rust 1.53 and the edition changes.
See #84513
r? @estebank