diff options
| author | Robert Xiao <brx@cs.ubc.ca> | 2021-08-13 02:03:31 -0600 |
|---|---|---|
| committer | Robert Xiao <brx@cs.ubc.ca> | 2021-09-09 00:11:29 -0600 |
| commit | 6ff5b471ef7806c40e57b9e83107ce4d62012d1b (patch) | |
| tree | 2040e2852b9d75d7c2b5ba50243603dd8d285705 /compiler/rustc_codegen_llvm/src | |
| parent | 626649ff1f33e89e471fff9e90bbb0a6d30141f9 (diff) | |
| download | rust-6ff5b471ef7806c40e57b9e83107ce4d62012d1b.tar.gz rust-6ff5b471ef7806c40e57b9e83107ce4d62012d1b.zip | |
Fix issue #72649: avoid spurious "previous iteration of loop" errors.
Only follow backwards edges during get_moved_indexes if the move path is definitely initialized at loop entry. Otherwise, the error occurred prior to the loop, so we ignore the backwards edges to avoid generating misleading "value moved here, in previous iteration of loop" errors. This patch also slightly improves the analysis of inits, including NonPanicPathOnly initializations (which are ignored by drop_flag_effects::for_location_inits). This is required for the definite initialization analysis, but may also help find certain skipped reinits in rare cases. Patch passes all non-ignored src/test/ui testcases.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
