Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2d1d443

Browse files
authoredDec 13, 2023
Rollup merge of #118858 - mu001999:dead_code/clean, r=cuviper
Remove dead codes in core Detected by #118257
2 parents 3340d49 + 6c0dbb8 commit 2d1d443

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎library/core/src/fmt/num.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait DisplayInt:
1515
fn zero() -> Self;
1616
fn from_u8(u: u8) -> Self;
1717
fn to_u8(&self) -> u8;
18-
fn to_u16(&self) -> u16;
18+
#[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))]
1919
fn to_u32(&self) -> u32;
2020
fn to_u64(&self) -> u64;
2121
fn to_u128(&self) -> u128;
@@ -27,7 +27,7 @@ macro_rules! impl_int {
2727
fn zero() -> Self { 0 }
2828
fn from_u8(u: u8) -> Self { u as Self }
2929
fn to_u8(&self) -> u8 { *self as u8 }
30-
fn to_u16(&self) -> u16 { *self as u16 }
30+
#[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))]
3131
fn to_u32(&self) -> u32 { *self as u32 }
3232
fn to_u64(&self) -> u64 { *self as u64 }
3333
fn to_u128(&self) -> u128 { *self as u128 }
@@ -40,7 +40,7 @@ macro_rules! impl_uint {
4040
fn zero() -> Self { 0 }
4141
fn from_u8(u: u8) -> Self { u as Self }
4242
fn to_u8(&self) -> u8 { *self as u8 }
43-
fn to_u16(&self) -> u16 { *self as u16 }
43+
#[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))]
4444
fn to_u32(&self) -> u32 { *self as u32 }
4545
fn to_u64(&self) -> u64 { *self as u64 }
4646
fn to_u128(&self) -> u128 { *self as u128 }

0 commit comments

Comments
 (0)
Failed to load comments.