Add BITS
associated constant to all integer types.
This commit is contained in:
parent
a2c82df1f5
commit
3f68ae47df
1 changed files with 8 additions and 0 deletions
|
@ -348,6 +348,10 @@ $EndFeature, "
|
||||||
pub const MAX: Self = !Self::MIN;
|
pub const MAX: Self = !Self::MIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The size of this integer type in bits.
|
||||||
|
#[unstable(feature = "int_bits_const", issue = "none")]
|
||||||
|
pub const BITS: u32 = $BITS;
|
||||||
|
|
||||||
doc_comment! {
|
doc_comment! {
|
||||||
concat!("Converts a string slice in a given base to an integer.
|
concat!("Converts a string slice in a given base to an integer.
|
||||||
|
|
||||||
|
@ -2601,6 +2605,10 @@ $EndFeature, "
|
||||||
pub const MAX: Self = !0;
|
pub const MAX: Self = !0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The size of this integer type in bits.
|
||||||
|
#[unstable(feature = "int_bits_const", issue = "none")]
|
||||||
|
pub const BITS: u32 = $BITS;
|
||||||
|
|
||||||
doc_comment! {
|
doc_comment! {
|
||||||
concat!("Converts a string slice in a given base to an integer.
|
concat!("Converts a string slice in a given base to an integer.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue