about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorKyle Huey <khuey@kylehuey.com>2024-08-03 21:23:35 -0700
committerKyle Huey <khuey@kylehuey.com>2024-08-03 21:23:35 -0700
commit709406fc6c792bd5dd0d07fbc59c4437b3d47f95 (patch)
treed3fb71f143025348749b9eef0c62c4baf05e8951 /compiler/rustc_pattern_analysis/src
parenta6043039ad3aef48e08d72a3e32545accdee427a (diff)
downloadrust-709406fc6c792bd5dd0d07fbc59c4437b3d47f95.tar.gz
rust-709406fc6c792bd5dd0d07fbc59c4437b3d47f95.zip
When deduplicating unreachable blocks, erase the source information.
After deduplication the block conceptually belongs to multiple locations
in the source. Although these blocks are unreachable, in #123341 we did
come across a real side effect, an unreachable block that survives into
the compiled code can cause a debugger to set a breakpoint on the wrong
instruction. Erasing the source information ensures that a debugger will
never be misled into thinking that the unreachable block is worth setting
a breakpoint on, especially after #128627.

Technically we don't need to erase the source information if all the
deduplicated blocks have identical source information, but tracking
that seems like more effort than it's worth.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions