about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2021-01-31 16:36:41 +0100
committerGitHub <noreply@github.com>2021-01-31 16:36:41 +0100
commit7e3a8ec6888a04a4ebc248f6178ae02b48dea3b6 (patch)
tree44bee011f9a43bf0149bf81458666a4cfea912f0 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent0e63af5da3400ace48a0345117980473fd21ad73 (diff)
parent0f4bab246b341b5d67ba1c01d81c4822f96dd878 (diff)
downloadrust-7e3a8ec6888a04a4ebc248f6178ae02b48dea3b6.tar.gz
rust-7e3a8ec6888a04a4ebc248f6178ae02b48dea3b6.zip
Rollup merge of #80092 - sexxi-goose:restrict_precision, r=nikomatsakis
2229: Fix issues with move closures and mutability

This PR fixes two issues when feature `capture_disjoint_fields` is used.

1. Can't mutate using a mutable reference
2. Move closures try to move value out through a reference.

To do so, we
1. Compute the mutability of the capture and store it as part of the `CapturedPlace`  that is written in TypeckResults
2. Restrict capture precision. Note this is temporary for now, to allow the feature to be used with move closures and ByValue captures and might change depending on discussions with the lang team.
    - No Derefs are captured for ByValue captures, since that will result in value behind a reference getting moved.
    - No projections are applied to raw pointers since these require unsafe blocks. We capture
    them completely.

r? `````@nikomatsakis`````
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions