diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index e354287453b..bc695b3b31d 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -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}")); } }