Skip to content

Commit a7e5d0d

Browse files
authored
Rollup merge of #71749 - RalfJung:miri-error-print, r=oli-obk
fix Miri error message padding I screwed up in the previous PR, and accidentally padded with spaces instead of 0s... r? @oli-obk
2 parents 25a471e + 1bab6a4 commit a7e5d0d

File tree

1 file changed

+2
-2
lines changed
  • src/librustc_middle/mir/interpret

1 file changed

+2
-2
lines changed

src/librustc_middle/mir/interpret/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ impl fmt::Display for UndefinedBehaviorInfo {
437437
DerefFunctionPointer(a) => write!(f, "accessing {} which contains a function", a),
438438
ValidationFailure(ref err) => write!(f, "type validation failed: {}", err),
439439
InvalidBool(b) => {
440-
write!(f, "interpreting an invalid 8-bit value as a bool: 0x{:2x}", b)
440+
write!(f, "interpreting an invalid 8-bit value as a bool: 0x{:02x}", b)
441441
}
442442
InvalidChar(c) => {
443-
write!(f, "interpreting an invalid 32-bit value as a char: 0x{:8x}", c)
443+
write!(f, "interpreting an invalid 32-bit value as a char: 0x{:08x}", c)
444444
}
445445
InvalidDiscriminant(val) => write!(f, "enum value has invalid discriminant: {}", val),
446446
InvalidFunctionPointer(p) => {

0 commit comments

Comments
 (0)