print local fields as _2.1 instead of _2 (field 1)

This commit is contained in:
Oliver Schneider 2017-02-10 21:59:29 +01:00
parent 1e7481f96e
commit 523c1877d9

View File

@ -1367,13 +1367,13 @@ pub(super) fn dump_local(&self, lvalue: Lvalue<'tcx>) {
if let Lvalue::Local { frame, local, field } = lvalue {
let mut allocs = Vec::new();
let mut msg = format!("{:?}", local);
if let Some(field) = field {
write!(msg, ".{}", field).unwrap();
}
let last_frame = self.stack.len() - 1;
if frame != last_frame {
write!(msg, " ({} frames up)", last_frame - frame).unwrap();
}
if let Some(field) = field {
write!(msg, " (field {:?})", field).unwrap();
}
write!(msg, ":").unwrap();
match self.stack[frame].get_local(local, field.map(|(i, _)| i)) {