Skip to content

Commit 1bab6a4

Browse files
committed
fix Miri error message padding
1 parent fd61d06 commit 1bab6a4

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
@@ -439,10 +439,10 @@ impl fmt::Display for UndefinedBehaviorInfo {
439439
DerefFunctionPointer(a) => write!(f, "accessing {} which contains a function", a),
440440
ValidationFailure(ref err) => write!(f, "type validation failed: {}", err),
441441
InvalidBool(b) => {
442-
write!(f, "interpreting an invalid 8-bit value as a bool: 0x{:2x}", b)
442+
write!(f, "interpreting an invalid 8-bit value as a bool: 0x{:02x}", b)
443443
}
444444
InvalidChar(c) => {
445-
write!(f, "interpreting an invalid 32-bit value as a char: 0x{:8x}", c)
445+
write!(f, "interpreting an invalid 32-bit value as a char: 0x{:08x}", c)
446446
}
447447
InvalidDiscriminant(val) => write!(f, "enum value has invalid discriminant: {}", val),
448448
InvalidFunctionPointer(p) => {

0 commit comments

Comments
 (0)