未验证 提交 8d9912ef 编写于 作者: D Dylan DPC 提交者: GitHub

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
......@@ -439,10 +439,10 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
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) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册