diff options
| author | bors <bors@rust-lang.org> | 2020-10-13 20:20:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-13 20:20:27 +0000 |
| commit | adef9da30f1ecbfeb81312d01ed94ac53f7161ba (patch) | |
| tree | 8089557192478546df01fc2df840c28a18c0f9e8 /compiler/rustc_codegen_llvm | |
| parent | d65c08e9cc164b7b44de53503fae859a4fafd976 (diff) | |
| parent | 50627a39c178b30a1bf2796201e442a61bdec369 (diff) | |
| download | rust-adef9da30f1ecbfeb81312d01ed94ac53f7161ba.tar.gz rust-adef9da30f1ecbfeb81312d01ed94ac53f7161ba.zip | |
Auto merge of #75213 - dingxiangfei2009:yield-point-in-match-guard, r=tmandry
[generator] Special cases for match guard when analyzing interior types in generators Fix #72651 This proposes one of ways to fix the mentioned issue. One cause of #72651 is that the interior type analysis misses out types of match pattern locals. Those locals are manifested as temporary borrows in the scopes of match arm guards. If uses of these locals appear after yield points, the borrows from them were not considered live across the yield points. However, this is not the case since the borrowing always happens at the very beginning of the match guard. This calls for special treatment to analysis of types appearing in the match guard. Those borrows are recorded as the HIR tree is walked by `InteriorVisitor` and their uses are recorded whenever a yield point is crossed.
Diffstat (limited to 'compiler/rustc_codegen_llvm')
0 files changed, 0 insertions, 0 deletions
