Skip to content

Commit

Permalink
Balance the debug output of Lvalue Subslice
Browse files Browse the repository at this point in the history
  • Loading branch information
nbp committed Nov 10, 2016
1 parent 187d989 commit 4ce4900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ impl<'tcx> Debug for Lvalue<'tcx> {
ProjectionElem::ConstantIndex { offset, min_length, from_end: true } =>
write!(fmt, "{:?}[-{:?} of {:?}]", data.base, offset, min_length),
ProjectionElem::Subslice { from, to } if to == 0 =>
write!(fmt, "{:?}[{:?}:", data.base, from),
write!(fmt, "{:?}[{:?}:]", data.base, from),
ProjectionElem::Subslice { from, to } if from == 0 =>
write!(fmt, "{:?}[:-{:?}]", data.base, to),
ProjectionElem::Subslice { from, to } =>
Expand Down

0 comments on commit 4ce4900

Please sign in to comment.