From 5e11c8fc2bae9f9453ef79fef012c46645a24986 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sun, 26 Nov 2017 22:43:56 +0100 Subject: [PATCH] Deprecate the Formatter::flags method, fix #46237 --- src/libcore/fmt/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 897222747f5..660cd0d6dd1 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -1305,6 +1305,9 @@ impl<'a> Formatter<'a> { /// Flags for formatting #[stable(feature = "rust1", since = "1.0.0")] + #[rustc_deprecated(since = "1.24.0", + reason = "use the `sign_plus`, `sign_minus`, `alternate`, \ + or `sign_aware_zero_pad` methods instead")] pub fn flags(&self) -> u32 { self.flags } /// Character used as 'fill' whenever there is alignment