diff --git a/src/format/formatting.rs b/src/format/formatting.rs index 45b793092c..1fdc31b48e 100644 --- a/src/format/formatting.rs +++ b/src/format/formatting.rs @@ -159,6 +159,7 @@ impl<'a, I: Iterator + Clone, B: Borrow>> Display for Delayed /// Internally used by `DelayedFormat`. #[cfg(any(feature = "alloc", feature = "std"))] #[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))] +#[deprecated(since = "0.4.32")] pub fn format<'a, I, B>( w: &mut fmt::Formatter, date: Option<&NaiveDate>, @@ -184,6 +185,7 @@ where /// Formats single formatting item #[cfg(any(feature = "alloc", feature = "std"))] #[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))] +#[deprecated(since = "0.4.32")] pub fn format_item( w: &mut fmt::Formatter, date: Option<&NaiveDate>, @@ -206,6 +208,7 @@ pub fn format_item( /// Internally used by `DelayedFormat`. #[cfg(feature = "unstable-locales")] #[cfg_attr(docsrs, doc(cfg(feature = "unstable-locales")))] +#[deprecated(since = "0.4.32")] pub fn format_localized<'a, I, B>( w: &mut fmt::Formatter, date: Option<&NaiveDate>, @@ -231,6 +234,7 @@ where /// Formats single formatting item #[cfg(feature = "unstable-locales")] #[cfg_attr(docsrs, doc(cfg(feature = "unstable-locales")))] +#[deprecated(since = "0.4.32")] pub fn format_item_localized( w: &mut fmt::Formatter, date: Option<&NaiveDate>, diff --git a/src/format/mod.rs b/src/format/mod.rs index d22cdf071a..d86affab90 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -62,8 +62,10 @@ pub(crate) use formatting::write_rfc2822; ))] pub(crate) use formatting::write_rfc3339; #[cfg(any(feature = "alloc", feature = "std"))] +#[allow(deprecated)] pub use formatting::{format, format_item, DelayedFormat}; #[cfg(feature = "unstable-locales")] +#[allow(deprecated)] pub use formatting::{format_item_localized, format_localized}; #[cfg(all(feature = "unstable-locales", any(feature = "alloc", feature = "std")))] pub use locales::Locale;