1
Fork 0

Clarify that [iu]size bounds were only defined for the target arch

This commit is contained in:
SOFe 2022-07-11 15:05:00 +08:00
parent a51fb2ba82
commit 01a9ff0e85
No known key found for this signature in database
GPG key ID: 0C2A8814637DCBDE
3 changed files with 32 additions and 24 deletions

View file

@ -2,9 +2,10 @@ macro_rules! int_impl {
($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
$rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
$reversed:expr, $le_bytes:expr, $be_bytes:expr,
$to_xe_bytes_doc:expr, $from_xe_bytes_doc:expr) => {
/// The smallest value that can be represented by this integer type,
#[doc = concat!("&minus;2<sup>", $BITS_MINUS_ONE, "</sup>.")]
$to_xe_bytes_doc:expr, $from_xe_bytes_doc:expr,
$bound_condition:expr) => {
/// The smallest value that can be represented by this integer type
#[doc = concat!("(&minus;2<sup>", $BITS_MINUS_ONE, "</sup>", $bound_condition, ")")]
///
/// # Examples
///
@ -16,8 +17,8 @@ macro_rules! int_impl {
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
pub const MIN: Self = !0 ^ ((!0 as $UnsignedT) >> 1) as Self;
/// The largest value that can be represented by this integer type,
#[doc = concat!("2<sup>", $BITS_MINUS_ONE, "</sup> &minus; 1.")]
/// The largest value that can be represented by this integer type
#[doc = concat!("(2<sup>", $BITS_MINUS_ONE, "</sup> &minus; 1", $bound_condition, ")")]
///
/// # Examples
///