Skip to content

Commit 8270faf

Browse files
committed
Auto merge of #46284 - SimonSapin:deprecate-formatter-flags, r=sfackler
Deprecate the Formatter::flags method, fix #46237 This fixes #46237.
2 parents 73df30d + 5e11c8f commit 8270faf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: 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)