We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eba45f0 + 7ba5f16 commit c1847c9Copy full SHA for c1847c9
src/libcore/num/mod.rs
@@ -113,12 +113,14 @@ macro_rules! int_impl {
113
$mul_with_overflow:path) => {
114
/// Returns the smallest value that can be represented by this integer type.
115
#[stable(feature = "rust1", since = "1.0.0")]
116
+ #[inline]
117
pub fn min_value() -> $T {
118
(-1 as $T) << ($BITS - 1)
119
}
120
121
/// Returns the largest value that can be represented by this integer type.
122
123
124
pub fn max_value() -> $T {
125
let min = $T::min_value(); !min
126
0 commit comments