Uh oh!
There was an error while loading. Please reload this page.
rustc: remove Res::Upvar. - #61276
Conversation
eddyb
commented
May 28, 2019
@bors try |
bors
commented
May 28, 2019
⌛ Trying commit 5934fcc73a9c9950978089c185877fbc85ea9b4b with merge 65978d81bc091c03518ff224ee97411cb6091b4d... |
bors
commented
May 28, 2019
☀️ Try build successful - checks-travis |
Centril
commented
May 28, 2019
@rust-timer build 65978d81bc091c03518ff224ee97411cb6091b4d |
rust-timer
commented
May 28, 2019
Success: Queued 65978d81bc091c03518ff224ee97411cb6091b4d with parent 7da1185, comparison URL. |
rust-timer
commented
May 28, 2019
Finished benchmarking try commit 65978d81bc091c03518ff224ee97411cb6091b4d, comparison URL. |
varkor
commented
May 28, 2019
Looks good! |
eddyb
commented
May 28, 2019
Looks like noise to me. Also, I've pushed the HIR-based upvar collection. |
bors
commented
May 29, 2019
☔ The latest upstream changes (presumably #61305) made this pull request unmergeable. Please resolve the merge conflicts. |
eddyb
commented
May 29, 2019
(You can ignore test failures, I just wanted to push my progress in moving the |
rust-highfive
commented
May 29, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
There was a problem hiding this comment.
Does this data structure have any "classic" name?
Search by "IndexMap" only leads to the Rust version.
There was a problem hiding this comment.
I don't really know (for the record, this crate used to be called ordermap). cc @bluss
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Great to see this removed.
I somehow missed the moment when all this out-of-place stuff was added to the parser.
There was a problem hiding this comment.
The replacement in HIR lowering is not done yet, so if you want I can back out the async changes and do that in a future PR.
There was a problem hiding this comment.
r=me for the part before async then
There was a problem hiding this comment.
I've submitted #61413 that builds upon this and implements the async part.
petrochenkov
commented
May 30, 2019
I didn't look at the async parts very carefully, perhaps some other reviewer would be more suitable for those. |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
Centril
commented
Jun 1, 2019
@bors retry collection-tests... |
bors
commented
Jun 1, 2019
⌛ Testing commit f7a4c9d with merge 044fb846ee76c0a864e75d5ae20b6ca398b119be... |
bors
commented
Jun 2, 2019
💔 Test failed - status-appveyor |
eddyb
commented
Jun 2, 2019
@bors retry (spurious Windows link failure?) |
bors
commented
Jun 2, 2019
rustc: remove Res::Upvar. By keeping track of the current "`body_owner`" (the `DefId` of the current fn/closure/const/etc.) in several passes, `Res::Upvar` and `hir::Upvar` don't need to contain contextual information about the closure. By leveraging [`indexmap`](https://docs.rs/indexmap), the list of upvars for a given closure can now also be queried, to check whether a local variable is a closure capture, and so `Res::Upvar` can be merged with `Res::Local`. And finally, the `tcx.upvars(...)` query now collects upvars from HIR, without relying on `rustc_resolve`. r? @petrochenkov cc @varkor@davidtwco
bors
commented
Jun 2, 2019
☀️ Test successful - checks-travis, status-appveyor |
rust-highfive
commented
Jun 2, 2019
📣 Toolstate changed by #61276! Tested on commit 4c7bb8b. 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk@phansch, @rust-lang/infra). |
Tested on commit rust-lang/rust@4c7bb8b. Direct link to PR: <rust-lang/rust#61276> 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk@phansch, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk@phansch, @rust-lang/infra). 💔 rls on windows: test-pass → build-fail (cc @Xanewok, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @Xanewok, @rust-lang/infra).
Rustup for rust-lang/rust#61276 changelog: none
Rustup for rust-lang/rust#61276 changelog: none
…-sane-way, r=eddyb Re-implement async fn drop order lowering This PR re-implements the async fn drop order lowering changes so that it all takes place in HIR lowering, building atop the work done by @eddyb to refactor `Res::Upvar`. Previously, this types involved in the lowering were constructed in libsyntax as they had to be used during name resolution and HIR lowering. This was awful because none of that logic should have existed in libsyntax. This commit also changes `ArgSource` to keep a `HirId` to the original argument pattern rather than a cloned copy of the pattern. Only b7aa4ed and 71fb8fa should be reviewed, any other commits are from rust-lang#61276 (though 447e336 might end up staying in this PR). As a nice side effect, it also fixesrust-lang#61187 (cc rust-lang#61192). r? @eddyb cc @cramertj
…-sane-way, r=eddyb Re-implement async fn drop order lowering This PR re-implements the async fn drop order lowering changes so that it all takes place in HIR lowering, building atop the work done by @eddyb to refactor `Res::Upvar`. Previously, this types involved in the lowering were constructed in libsyntax as they had to be used during name resolution and HIR lowering. This was awful because none of that logic should have existed in libsyntax. This commit also changes `ArgSource` to keep a `HirId` to the original argument pattern rather than a cloned copy of the pattern. Only b7aa4ed and 71fb8fa should be reviewed, any other commits are from rust-lang#61276 (though 447e336 might end up staying in this PR). As a nice side effect, it also fixesrust-lang#61187 (cc rust-lang#61192). r? @eddyb cc @cramertj
…-sane-way, r=eddyb Re-implement async fn drop order lowering This PR re-implements the async fn drop order lowering changes so that it all takes place in HIR lowering, building atop the work done by @eddyb to refactor `Res::Upvar`. Previously, this types involved in the lowering were constructed in libsyntax as they had to be used during name resolution and HIR lowering. This was awful because none of that logic should have existed in libsyntax. This commit also changes `ArgSource` to keep a `HirId` to the original argument pattern rather than a cloned copy of the pattern. Only b7aa4ed and 71fb8fa should be reviewed, any other commits are from rust-lang#61276 (though 447e336 might end up staying in this PR). As a nice side effect, it also fixesrust-lang#61187 (cc rust-lang#61192). r? @eddyb cc @cramertj
By keeping track of the current "
body_owner" (theDefIdof the current fn/closure/const/etc.) in several passes,Res::Upvarandhir::Upvardon't need to contain contextual information about the closure.By leveraging
indexmap, the list of upvars for a given closure can now also be queried, to check whether a local variable is a closure capture, and soRes::Upvarcan be merged withRes::Local.And finally, the
tcx.upvars(...)query now collects upvars from HIR, without relying onrustc_resolve.r? @petrochenkov cc @varkor@davidtwco