Inline {min,max}_value
even in debug builds
This commit is contained in:
parent
22bc9e1d9c
commit
3b49ab6e48
1 changed files with 4 additions and 4 deletions
|
@ -252,7 +252,7 @@ Basic usage:
|
||||||
$EndFeature, "
|
$EndFeature, "
|
||||||
```"),
|
```"),
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
pub const fn min_value() -> Self {
|
pub const fn min_value() -> Self {
|
||||||
!0 ^ ((!0 as $UnsignedT) >> 1) as Self
|
!0 ^ ((!0 as $UnsignedT) >> 1) as Self
|
||||||
|
@ -271,7 +271,7 @@ Basic usage:
|
||||||
$EndFeature, "
|
$EndFeature, "
|
||||||
```"),
|
```"),
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
pub const fn max_value() -> Self {
|
pub const fn max_value() -> Self {
|
||||||
!Self::min_value()
|
!Self::min_value()
|
||||||
|
@ -2308,7 +2308,7 @@ Basic usage:
|
||||||
```"),
|
```"),
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
pub const fn min_value() -> Self { 0 }
|
pub const fn min_value() -> Self { 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2325,7 +2325,7 @@ stringify!($MaxV), ");", $EndFeature, "
|
||||||
```"),
|
```"),
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
pub const fn max_value() -> Self { !0 }
|
pub const fn max_value() -> Self { !0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue