mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 12:36:47 +00:00
mir: print the scope and span for variables.
This commit is contained in:
parent
b622c3e085
commit
a563711b6a
@ -242,7 +242,11 @@ fn write_mir_intro(tcx: &TyCtxt, nid: NodeId, mir: &Mir, w: &mut Write)
|
||||
if var.mutability == Mutability::Mut {
|
||||
write!(w, "mut ")?;
|
||||
}
|
||||
writeln!(w, "{:?}: {}; // {}", Lvalue::Var(i as u32), var.ty, var.name)?;
|
||||
writeln!(w, "{:?}: {}; // {} in {}",
|
||||
Lvalue::Var(i as u32),
|
||||
var.ty,
|
||||
var.name,
|
||||
comment(tcx, var.scope, var.span))?;
|
||||
}
|
||||
|
||||
// Compiler-introduced temporary types.
|
||||
|
Loading…
Reference in New Issue
Block a user