Skip to content

Commit 5e11c8f

Browse files
committed
Deprecate the Formatter::flags method, fix #46237
1 parent 71da1c2 commit 5e11c8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libcore/fmt/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,9 @@ impl<'a> Formatter<'a> {
13051305

13061306
/// Flags for formatting
13071307
#[stable(feature = "rust1", since = "1.0.0")]
1308+
#[rustc_deprecated(since = "1.24.0",
1309+
reason = "use the `sign_plus`, `sign_minus`, `alternate`, \
1310+
or `sign_aware_zero_pad` methods instead")]
13081311
pub fn flags(&self) -> u32 { self.flags }
13091312

13101313
/// Character used as 'fill' whenever there is alignment

0 commit comments

Comments
 (0)