Skip to content

Commit

Permalink
Emit full spans in miri
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 6, 2022
1 parent 2ca6e75 commit 3525e09
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,8 @@ fn report_msg<'tcx>(
err.span_note(frame_info.span, &frame_info.to_string());
} else {
let sm = sess.source_map();
let lo = sm.lookup_char_pos(frame_info.span.lo());
let filename = sm.filename_for_diagnostics(&lo.file.name);
err.note(format!("{frame_info} at {}:{}:{}", filename, lo.line, lo.col.0 + 1));
let span = sm.span_to_embeddable_string(frame_info.span);
err.note(format!("{frame_info} at {span}"));
}
}

Expand Down

0 comments on commit 3525e09

Please sign in to comment.