about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-02 11:46:13 +0000
committerbors <bors@rust-lang.org>2019-06-02 11:46:13 +0000
commit4c7bb8b0d9d3c5149c8ad12b59604ccb57e8accc (patch)
tree890c2d00449ffc87659a07f6f8ea4eb9cf64275e /src/test/codegen
parent538e17a3fdb517e0cd63f7c16d3292e7d710f7c7 (diff)
parentf7a4c9d7b55950c6b8451b42f203df2c009fc653 (diff)
downloadrust-4c7bb8b0d9d3c5149c8ad12b59604ccb57e8accc.tar.gz
rust-4c7bb8b0d9d3c5149c8ad12b59604ccb57e8accc.zip
Auto merge of #61276 - eddyb:kill-res-upvar, r=petrochenkov
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
Diffstat (limited to 'src/test/codegen')
0 files changed, 0 insertions, 0 deletions