We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1a0042 commit 90916d0Copy full SHA for 90916d0
src/librustc_mir/build/scope.rs
@@ -370,8 +370,12 @@ impl DropTree {
370
cfg.push(block, stmt);
371
let target = blocks[drop_data.1].unwrap();
372
if target != block {
373
+ // Diagnostics don't use this `Span` but debuginfo
374
+ // might, which could cause breakpoints to end up in the
375
+ // wrong place.
376
+ let source_info = SourceInfo { span: DUMMY_SP, ..drop_data.0.source_info };
377
let terminator = TerminatorKind::Goto { target };
- cfg.terminate(block, drop_data.0.source_info, terminator);
378
+ cfg.terminate(block, source_info, terminator);
379
}
380
381
0 commit comments