Ok(x) => x,
Err(_) => throw_validation_failure!($what, $where),
}
- }}
+ }};
}
/// We want to show a nice path to the invalid field for diagnostics,
err_unsup!(InvalidNullPointerUsage) =>
throw_validation_failure!("NULL reference", self.path),
err_unsup!(AlignmentCheckFailed { required, has }) =>
- throw_validation_failure!(format!("unaligned reference \
+ throw_validation_failure!(format_args!("unaligned reference \
(required {} byte alignment but found {})",
required.bytes(), has.bytes()), self.path),
err_unsup!(ReadBytesAsPointer) =>
let value = try_validation!(value.not_undef(),
value,
self.path,
- format!(
+ format_args!(
"something {}",
wrapping_range_format(&layout.valid_range, max_hi),
)
throw_validation_failure!(
"a potentially NULL pointer",
self.path,
- format!(
+ format_args!(
"something that cannot possibly fail to be {}",
wrapping_range_format(&layout.valid_range, max_hi)
)
throw_validation_failure!(
"a pointer",
self.path,
- format!(
+ format_args!(
"something that cannot possibly fail to be {}",
wrapping_range_format(&layout.valid_range, max_hi)
)
throw_validation_failure!(
bits,
self.path,
- format!("something {}", wrapping_range_format(&layout.valid_range, max_hi))
+ format_args!("something {}", wrapping_range_format(&layout.valid_range, max_hi))
)
}
}