rust/compiler/rustc_mir_transform
Trevor Gross 5044b20028
Rollup merge of #128628 - khuey:simply-cfg-erase-source-info, r=nnethercote
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.

I'll let njn redirect this one too. r? `@nnethercote`
2024-08-18 23:41:47 -05:00
..
src Rollup merge of #128628 - khuey:simply-cfg-erase-source-info, r=nnethercote 2024-08-18 23:41:47 -05:00
Cargo.toml Simplify match based on the cast result of IntToInt. 2024-08-03 10:55:43 +08:00
messages.ftl Remove MIR unsafe check 2024-04-03 08:50:12 +00:00