about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-05 04:46:37 +0100
committerGitHub <noreply@github.com>2022-03-05 04:46:37 +0100
commitc7d200441b6dbc510cfe179ed0fc0ca94aa1e429 (patch)
tree7620331d0fba99d05bf8f8f939975134657a3d83 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3e1e9b486605da4fe25329acfd14042b0d6819f6 (diff)
parentadd169d4140c7583b876619b2e19ba76f4aa76e4 (diff)
downloadrust-c7d200441b6dbc510cfe179ed0fc0ca94aa1e429.tar.gz
rust-c7d200441b6dbc510cfe179ed0fc0ca94aa1e429.zip
Rollup merge of #94460 - eholk:reenable-drop-tracking-tests, r=tmiasko
Reenable generator drop tracking tests and fix mutation handling

The previous PR, #94068, was overly zealous in counting mutations as borrows, which effectively nullified drop tracking. We would have caught this except the drop tracking tests were still ignored, despite having the option of using the `-Zdrop-tracking` flag now.

This PR fixes the issue introduced by #94068 by only counting mutations as borrows the mutated place has a project. This is sufficient to distinguish `x.y = 42` (which should count as a borrow of `x`) from `x = 42` (which is not a borrow of `x` because the whole variable is overwritten).

This PR also re-enables the drop tracking regression tests using the `-Zdrop-tracking` flag so we will avoid introducing these sorts of issues in the future.

Thanks to ``@tmiasko`` for noticing this problem and pointing it out!

r? ``@tmiasko``
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions