Split span_to_string into span_to_diagnostic/embeddable_string
This commit is contained in:
parent
0ac9ca4f88
commit
37dbe868c9
13 changed files with 60 additions and 24 deletions
|
@ -132,9 +132,9 @@ enum LiveNodeKind {
|
|||
fn live_node_kind_to_string(lnk: LiveNodeKind, tcx: TyCtxt<'_>) -> String {
|
||||
let sm = tcx.sess.source_map();
|
||||
match lnk {
|
||||
UpvarNode(s) => format!("Upvar node [{}]", sm.span_to_string(s)),
|
||||
ExprNode(s) => format!("Expr node [{}]", sm.span_to_string(s)),
|
||||
VarDefNode(s) => format!("Var def node [{}]", sm.span_to_string(s)),
|
||||
UpvarNode(s) => format!("Upvar node [{}]", sm.span_to_diagnostic_string(s)),
|
||||
ExprNode(s) => format!("Expr node [{}]", sm.span_to_diagnostic_string(s)),
|
||||
VarDefNode(s) => format!("Var def node [{}]", sm.span_to_diagnostic_string(s)),
|
||||
ClosureNode => "Closure node".to_owned(),
|
||||
ExitNode => "Exit node".to_owned(),
|
||||
}
|
||||
|
|
|
@ -717,7 +717,7 @@ impl<'tcx> Visitor<'tcx> for RegionResolutionVisitor<'tcx> {
|
|||
debug!(
|
||||
"visit_body(id={:?}, span={:?}, body.id={:?}, cx.parent={:?})",
|
||||
owner_id,
|
||||
self.tcx.sess.source_map().span_to_string(body.value.span),
|
||||
self.tcx.sess.source_map().span_to_diagnostic_string(body.value.span),
|
||||
body_id,
|
||||
self.cx.parent
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue