From fadac54b08f99cb5628e45ec9f0d94fb9ee4932b Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Mon, 10 Apr 2023 05:43:45 -0400 Subject: [PATCH] Hide long-deprecated items --- time/src/date_time.rs | 4 ++++ time/src/parsing/parsed.rs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/time/src/date_time.rs b/time/src/date_time.rs index 613bef2d1..8ef7d5da7 100644 --- a/time/src/date_time.rs +++ b/time/src/date_time.rs @@ -826,6 +826,7 @@ impl DateTime { // `OffsetDateTime` is made an alias of `DateTime`. Consider hiding these methods from // documentation in the future. + #[doc(hidden)] #[allow(dead_code)] // while functionally private #[deprecated(since = "0.3.18", note = "use `as_hms` instead")] pub const fn to_hms(self) -> (u8, u8, u8) @@ -835,6 +836,7 @@ impl DateTime { self.time.as_hms() } + #[doc(hidden)] #[allow(dead_code)] // while functionally private #[deprecated(since = "0.3.18", note = "use `as_hms_milli` instead")] pub const fn to_hms_milli(self) -> (u8, u8, u8, u16) @@ -844,6 +846,7 @@ impl DateTime { self.time.as_hms_milli() } + #[doc(hidden)] #[allow(dead_code)] // while functionally private #[deprecated(since = "0.3.18", note = "use `as_hms_micro` instead")] pub const fn to_hms_micro(self) -> (u8, u8, u8, u32) @@ -853,6 +856,7 @@ impl DateTime { self.time.as_hms_micro() } + #[doc(hidden)] #[allow(dead_code)] // while functionally private #[deprecated(since = "0.3.18", note = "use `as_hms_nano` instead")] pub const fn to_hms_nano(self) -> (u8, u8, u8, u32) diff --git a/time/src/parsing/parsed.rs b/time/src/parsing/parsed.rs index 26405cb11..04c74a720 100644 --- a/time/src/parsing/parsed.rs +++ b/time/src/parsing/parsed.rs @@ -423,6 +423,7 @@ impl Parsed { } /// Obtain the absolute value of the offset minute. + #[doc(hidden)] #[deprecated(since = "0.3.8", note = "use `parsed.offset_minute_signed()` instead")] pub const fn offset_minute(&self) -> Option { Some(const_try_opt!(self.offset_minute_signed()).unsigned_abs()) @@ -447,6 +448,7 @@ impl Parsed { } /// Obtain the absolute value of the offset second. + #[doc(hidden)] #[deprecated(since = "0.3.8", note = "use `parsed.offset_second_signed()` instead")] pub const fn offset_second(&self) -> Option { Some(const_try_opt!(self.offset_second_signed()).unsigned_abs()) @@ -523,6 +525,7 @@ impl Parsed { } /// Set the named component. + #[doc(hidden)] #[deprecated( since = "0.3.8", note = "use `parsed.set_offset_minute_signed()` instead" @@ -543,6 +546,7 @@ impl Parsed { } /// Set the named component. + #[doc(hidden)] #[deprecated( since = "0.3.8", note = "use `parsed.set_offset_second_signed()` instead" @@ -615,6 +619,7 @@ impl Parsed { } /// Set the named component and return `self`. + #[doc(hidden)] #[deprecated( since = "0.3.8", note = "use `parsed.with_offset_minute_signed()` instead" @@ -635,6 +640,7 @@ impl Parsed { } /// Set the named component and return `self`. + #[doc(hidden)] #[deprecated( since = "0.3.8", note = "use `parsed.with_offset_second_signed()` instead"