Emit full spans in miri

This commit is contained in:
Oli Scherer 2022-12-01 20:25:43 +00:00
parent 18a2c28052
commit 9188f8cb82

View File

@ -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}"));
}
}