diff options
| author | Brian Koropoff <bkoropoff@gmail.com> | 2014-10-25 21:40:25 -0700 |
|---|---|---|
| committer | Brian Koropoff <bkoropoff@gmail.com> | 2014-10-25 21:40:25 -0700 |
| commit | 1062955b46950114ed3a0a71c043e9644afdce48 (patch) | |
| tree | 98a26fa761f05ba70a2504744697c71af9e4bec0 /src/rustllvm/RustWrapper.cpp | |
| parent | 2877e47ea7409ff4ea820b0a6668111baf441377 (diff) | |
| download | rust-1062955b46950114ed3a0a71c043e9644afdce48.tar.gz rust-1062955b46950114ed3a0a71c043e9644afdce48.zip | |
Tweak mem categorization of upvar mutability
- Correctly categorize env pointer deref for `FnMut` as declared rather than inherited. This fixes an assert in borrowck. Closes #18238 - Categorize env pointer deref as mutable only if the closure is `FnMut` *and* the original variable is declared mutable. This disallows capture-by-value `FnMut` closures from mutating captured variables that aren't declared mutable. This is a difference from the equivalent desugared code which would permit it, but it is consistent with the behavior of procs. Closes #18335 - Avoid computing info about the env pointer if there isn't one.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
