diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2023-12-12 18:48:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-12 18:48:50 -0800 |
| commit | 2d1d443d7f868ea5bf3880d929ea1c66172f243d (patch) | |
| tree | 34938a5eb6da4262f3ebd1461718503e208b0c34 | |
| parent | 3340d49d22b1aba425779767278c40781826c2f5 (diff) | |
| parent | 6c0dbb8cc6ba28facf5d70e77373a776500a1701 (diff) | |
| download | rust-2d1d443d7f868ea5bf3880d929ea1c66172f243d.tar.gz rust-2d1d443d7f868ea5bf3880d929ea1c66172f243d.zip | |
Rollup merge of #118858 - mu001999:dead_code/clean, r=cuviper
Remove dead codes in core Detected by #118257
| -rw-r--r-- | library/core/src/fmt/num.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/fmt/num.rs b/library/core/src/fmt/num.rs index 778515f8616..ab2158394bf 100644 --- a/library/core/src/fmt/num.rs +++ b/library/core/src/fmt/num.rs @@ -15,7 +15,7 @@ trait DisplayInt: fn zero() -> Self; fn from_u8(u: u8) -> Self; fn to_u8(&self) -> u8; - fn to_u16(&self) -> u16; + #[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))] fn to_u32(&self) -> u32; fn to_u64(&self) -> u64; fn to_u128(&self) -> u128; @@ -27,7 +27,7 @@ macro_rules! impl_int { fn zero() -> Self { 0 } fn from_u8(u: u8) -> Self { u as Self } fn to_u8(&self) -> u8 { *self as u8 } - fn to_u16(&self) -> u16 { *self as u16 } + #[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))] fn to_u32(&self) -> u32 { *self as u32 } fn to_u64(&self) -> u64 { *self as u64 } fn to_u128(&self) -> u128 { *self as u128 } @@ -40,7 +40,7 @@ macro_rules! impl_uint { fn zero() -> Self { 0 } fn from_u8(u: u8) -> Self { u as Self } fn to_u8(&self) -> u8 { *self as u8 } - fn to_u16(&self) -> u16 { *self as u16 } + #[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))] fn to_u32(&self) -> u32 { *self as u32 } fn to_u64(&self) -> u64 { *self as u64 } fn to_u128(&self) -> u128 { *self as u128 } |
