// For zsts just print their type as their value gives no extra information
(Scalar::Raw { size: 0, .. }, _) => p!(print(ty)),
// Nontrivial types with scalar bit representation
- (Scalar::Raw { data, .. }, _) => {
+ (Scalar::Raw { data, size }, _) => {
let print = |mut this: Self| {
- write!(this, "transmute(0x{:x})", data)?;
+ write!(this, "transmute(0x{:01$x})", data, size as usize * 2)?;
Ok(this)
};
self = if print_ty {
// START rustc.main.ConstProp.after.mir
// bb0: {
// ...
-// _3 = const {transmute(0x1): std::option::Option<bool>};
+// _3 = const {transmute(0x01): std::option::Option<bool>};
// _4 = const 1isize;
// switchInt(const 1isize) -> [1isize: bb2, otherwise: bb1];
// }