Skip to content

Commit 916936c

Browse files
committed
Silence lint in fit_signed and fit_unsigned
1 parent 220b9b2 commit 916936c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_target/abi/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ impl Integer {
488488

489489
/// Finds the smallest Integer type which can represent the signed value.
490490
pub fn fit_signed(x: i128) -> Integer {
491+
#[cfg_attr(not(stage0), allow(overlapping_patterns))]
491492
match x {
492493
-0x0000_0000_0000_0080..=0x0000_0000_0000_007f => I8,
493494
-0x0000_0000_0000_8000..=0x0000_0000_0000_7fff => I16,
@@ -499,6 +500,7 @@ impl Integer {
499500

500501
/// Finds the smallest Integer type which can represent the unsigned value.
501502
pub fn fit_unsigned(x: u128) -> Integer {
503+
#[cfg_attr(not(stage0), allow(overlapping_patterns))]
502504
match x {
503505
0..=0x0000_0000_0000_00ff => I8,
504506
0..=0x0000_0000_0000_ffff => I16,

0 commit comments

Comments
 (0)