about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-28 10:36:56 +0000
committerbors <bors@rust-lang.org>2019-11-28 10:36:56 +0000
commit4752c05af4a5f392de026f9ae1877eae030be359 (patch)
tree8444aeb3326abf880a4dedc27e5869ea40ac6674 /src/rustllvm/PassWrapper.cpp
parent2539b5f157599fbcc005371a34897a42fa0a2421 (diff)
parent5bc15866d752d4ba4a02e9ab130b08cb8186d8f9 (diff)
downloadrust-4752c05af4a5f392de026f9ae1877eae030be359.tar.gz
rust-4752c05af4a5f392de026f9ae1877eae030be359.zip
Auto merge of #66246 - matthewjasper:simplify-mem-cat, r=pnkfelix
Simplify memory categorization

With AST borrowck gone, mem_categorization can be simplified, a lot.

* `cmt_` is now called `Place`. Most local variable names have been updated to reflect this, but the `cat_*` methods retain their names.
* `MemCategorizationContext` no longer needs a `ScopeTree` and always needs an `InferCtxt`.
* `Place` now uses a similar representation to `mir::Place` with a `Vec` of projections.
* `Upvar` places don't include the implicit environment and capture derefs. These are now handled by `regionck` when needed.
* Various types, methods and variants only used by AST borrowck have been removed.
* `ExprUseVisitor` now lives in `rustc_typeck::expr_use_visitor`.
* `MemCategorizationContext` and `Place` live in `rustc_typeck::mem_categorization`.
* `Place` is re-exported in `rustc_typeck::expr_use_visitor` so that Clippy can access it.

The loss of an error in `issue-4335.rs` is due to a change in capture inference in ill-formed programs. If any projection from a variable is moved from then we capture that variable by move, whether or not the place being moved from allows this.

Closes #66270
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions