Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 97f9171

Browse files
committed
Revert "Turned public+unstable+hidden functions into private functions"
See rust-lang#118159 (comment) for context. This reverts commit 62078df.
1 parent df7480a commit 97f9171

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

library/core/src/fmt/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,10 @@ impl FormattingOptions {
443443
Formatter { options: self, buf: write }
444444
}
445445

446+
#[doc(hidden)]
447+
#[unstable(feature = "fmt_internals", reason = "internal to standard library", issue = "none")]
446448
/// Flags for formatting
447-
fn flags(&mut self, flags: u32) {
449+
pub fn flags(&mut self, flags: u32) {
448450
self.sign = if flags & (1 << rt::Flag::SignPlus as u32) != 0 {
449451
Some(Sign::Plus)
450452
} else if flags & (1 << rt::Flag::SignMinus as u32) != 0 {
@@ -462,8 +464,10 @@ impl FormattingOptions {
462464
None
463465
};
464466
}
467+
#[doc(hidden)]
468+
#[unstable(feature = "fmt_internals", reason = "internal to standard library", issue = "none")]
465469
/// Flags for formatting
466-
fn get_flags(&self) -> u32 {
470+
pub fn get_flags(&self) -> u32 {
467471
<bool as Into<u32>>::into(self.get_sign() == Some(Sign::Plus)) << rt::Flag::SignPlus as u32
468472
| <bool as Into<u32>>::into(self.get_sign() == Some(Sign::Minus))
469473
<< rt::Flag::SignMinus as u32

0 commit comments

Comments
 (0)