Skip to content

Commit

Permalink
Rollup merge of #71749 - RalfJung:miri-error-print, r=oli-obk
Browse files Browse the repository at this point in the history
fix Miri error message padding

I screwed up in the previous PR, and accidentally padded with spaces instead of 0s...

r? @oli-obk
  • Loading branch information
Dylan-DPC authored May 1, 2020
2 parents d83d8be + 1bab6a4 commit 8d9912e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_middle/mir/interpret/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,10 @@ impl fmt::Display for UndefinedBehaviorInfo {
DerefFunctionPointer(a) => write!(f, "accessing {} which contains a function", a),
ValidationFailure(ref err) => write!(f, "type validation failed: {}", err),
InvalidBool(b) => {
write!(f, "interpreting an invalid 8-bit value as a bool: 0x{:2x}", b)
write!(f, "interpreting an invalid 8-bit value as a bool: 0x{:02x}", b)
}
InvalidChar(c) => {
write!(f, "interpreting an invalid 32-bit value as a char: 0x{:8x}", c)
write!(f, "interpreting an invalid 32-bit value as a char: 0x{:08x}", c)
}
InvalidDiscriminant(val) => write!(f, "enum value has invalid discriminant: {}", val),
InvalidFunctionPointer(p) => {
Expand Down

0 comments on commit 8d9912e

Please sign in to comment.