1
Fork 0

Split span_to_string into span_to_diagnostic/embeddable_string

This commit is contained in:
Andy Wang 2021-05-03 01:14:25 +01:00
parent 0ac9ca4f88
commit 37dbe868c9
No known key found for this signature in database
GPG key ID: 181B49F9F38F3374
13 changed files with 60 additions and 24 deletions

View file

@ -2365,7 +2365,10 @@ impl<'tcx> Debug for Rvalue<'tcx> {
)
} else {
let span = tcx.hir().span(hir_id);
format!("[closure@{}]", tcx.sess.source_map().span_to_string(span))
format!(
"[closure@{}]",
tcx.sess.source_map().span_to_diagnostic_string(span)
)
};
let mut struct_fmt = fmt.debug_struct(&name);