Uh oh!
There was an error while loading. Please reload this page.
Add lint for 2229 migrations - #80629
Conversation
rust-log-analyzer
commented
Jan 2, 2021
The job Click to see the possible cause of the failure (guessed by this bot) |
bors
commented
Jan 13, 2021
☔ The latest upstream changes (presumably #76219) made this pull request unmergeable. Please resolve the merge conflicts. |
nikomatsakis
left a comment
There was a problem hiding this comment.
By and large, this looks great. I left a few nits.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
nit: can we pull the body of this if out into a separate method?
There was a problem hiding this comment.
nit: you can use .any() instead =)
There was a problem hiding this comment.
Nit: maybe simpler to do root_var_min_capture_list.iter().any(|l| l.place.projections.len() > 0) ?
would we ever capture a and a.b? no, right?
There was a problem hiding this comment.
I wonder if we want to consider the Edition too .. e.g., in Edition 2021, maybe this lint should be a no-op
There was a problem hiding this comment.
When I initially wrote this the PR to introduce 2021 edition was in progress, so I didn't think too much at the time. I don't know if we should just ignore lints that are no-op without letting the user know about it.
There was a problem hiding this comment.
We don't really need migration here, right? The only drop that will run is still going to run at the same point either way (when the closure is dropped). I agree the analysis as implemented in this PR would be expected to warn, it's just that it's overly conservative.
There was a problem hiding this comment.
We don't need migrations here, but this PR doesn't implement the precise path yet. I can add another String to the tuple so that we don't need to move the test when I implement the precise path.
rust-log-analyzer
commented
Jan 19, 2021
The job Click to see the possible cause of the failure (guessed by this bot) |
f6e6601 to
eea0668Comparenikomatsakis
commented
Jan 27, 2021
@bors r+ |
bors
commented
Jan 27, 2021
📌 Commit eea0668100c15869891597eec40c0ac2a1b84712 has been approved by |
bors
commented
Jan 28, 2021
☔ The latest upstream changes (presumably #81461) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
commented
Jan 29, 2021
☔ The latest upstream changes (presumably #81493) made this pull request unmergeable. Please resolve the merge conflicts. |
nikomatsakis
commented
Jan 30, 2021
bors
commented
Jan 30, 2021
📌 Commit 11abaa1 has been approved by |
bors
commented
Jan 30, 2021
✌️ @arora-aman can now approve this pull request |
| "lazy_static", | ||
| "matchers", | ||
| "parking_lot 0.11.0", | ||
| "parking_lot 0.9.0", |
There was a problem hiding this comment.
Was this change to Cargo.lock intentional?
…sakis Add lint for 2229 migrations Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled. r? `@nikomatsakis`
jonas-schievink
commented
Jan 30, 2021
@bors r- based on #80629 (comment) |
Uh oh!
There was an error while loading. Please reload this page.
- This allows us add fake information after handling migrations if needed. - Capture analysis also priortizes what we see earlier, which means fake information should go in last.
rust-log-analyzer
commented
Feb 2, 2021
The job Click to see the possible cause of the failure (guessed by this bot) |
arora-aman
commented
Feb 2, 2021
Updated PR to handle issues some conflict with #80092 |
arora-aman
commented
Feb 2, 2021
@bors r+ |
bors
commented
Feb 2, 2021
📌 Commit 84f0a0a has been approved by |
arora-aman
commented
Feb 2, 2021
@bors r=nikomatsakis |
bors
commented
Feb 2, 2021
💡 This pull request was already approved, no need to approve it again.
|
bors
commented
Feb 2, 2021
📌 Commit 84f0a0a has been approved by |
…as-schievink Rollup of 11 pull requests Successful merges: - rust-lang#80629 (Add lint for 2229 migrations) - rust-lang#81022 (Add Frames Iterator for Backtrace) - rust-lang#81481 (move some tests) - rust-lang#81485 (Add some tests for associated-type-bounds issues) - rust-lang#81492 (rustdoc: Note why `rustdoc::html::markdown` is public) - rust-lang#81577 (const_evaluatable: consider sub-expressions to be evaluatable) - rust-lang#81599 (Implement `TrustedLen` for `Fuse<I: TrustedLen>`) - rust-lang#81608 (Improve handling of spans around macro result parse errors) - rust-lang#81609 (Remove the remains of query categories) - rust-lang#81630 (Fix overflowing text on mobile when sidebar is displayed) - rust-lang#81631 (Remove unneeded `mut` variable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Original message: Rollup merge of rust-lang#80629 - sexxi-goose:migrations_1, r=nikomatsakis Add lint for 2229 migrations Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled. r? `@nikomatsakis`
Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled.
r? @nikomatsakis