about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorAman Arora <me@aman-arora.com>2020-12-02 03:03:56 -0500
committerAman Arora <me@aman-arora.com>2021-01-29 15:37:40 -0500
commit34880825828260fad0a74621e4a13fe7da9a4a9d (patch)
treeac1c2f07868ee4edf9374193fb29d0bd905fc1f0 /src/test/codegen/src-hash-algorithm
parentb421cd56d945743defe3b2a32e2901648ac8dd2d (diff)
downloadrust-34880825828260fad0a74621e4a13fe7da9a4a9d.tar.gz
rust-34880825828260fad0a74621e4a13fe7da9a4a9d.zip
Compute mutability of closure captures
When `capture_disjoint_fields` is not enabled, checking if the root variable
binding is mutable would suffice.

However with the feature enabled, the captured place might be mutable
because it dereferences a mutable reference.

This PR computes the mutability of each capture after capture analysis
in rustc_typeck. We store this in `ty::CapturedPlace` and then use
`ty::CapturedPlace::mutability` in mir_build and borrow_check.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions