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.
fit_signed
fit_unsigned
1 parent 220b9b2 commit 916936cCopy full SHA for 916936c
src/librustc_target/abi/mod.rs
@@ -488,6 +488,7 @@ impl Integer {
488
489
/// Finds the smallest Integer type which can represent the signed value.
490
pub fn fit_signed(x: i128) -> Integer {
491
+ #[cfg_attr(not(stage0), allow(overlapping_patterns))]
492
match x {
493
-0x0000_0000_0000_0080..=0x0000_0000_0000_007f => I8,
494
-0x0000_0000_0000_8000..=0x0000_0000_0000_7fff => I16,
@@ -499,6 +500,7 @@ impl Integer {
499
500
501
/// Finds the smallest Integer type which can represent the unsigned value.
502
pub fn fit_unsigned(x: u128) -> Integer {
503
504
505
0..=0x0000_0000_0000_00ff => I8,
506
0..=0x0000_0000_0000_ffff => I16,
0 commit comments