We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa6f3e5 commit cb7c75bCopy full SHA for cb7c75b
src/librustc_mir_build/build/scope.rs
@@ -363,8 +363,12 @@ impl DropTree {
363
cfg.push(block, stmt);
364
let target = blocks[drop_data.1].unwrap();
365
if target != block {
366
+ // Diagnostics don't use this `Span` but debuginfo
367
+ // might, which could cause breakpoints to end up in the
368
+ // wrong place.
369
+ let source_info = SourceInfo { span: DUMMY_SP, ..drop_data.0.source_info };
370
let terminator = TerminatorKind::Goto { target };
- cfg.terminate(block, drop_data.0.source_info, terminator);
371
+ cfg.terminate(block, source_info, terminator);
372
}
373
374
0 commit comments