Skip to content

Commit

Permalink
Revert "Turned public+unstable+hidden functions into private functions"
Browse files Browse the repository at this point in the history
See rust-lang#118159 (comment) for
context.

This reverts commit 62078df.
  • Loading branch information
EliasHolzmann committed Mar 8, 2024
1 parent 6622a78 commit c737858
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,10 @@ impl FormattingOptions {
Formatter { options: self, buf: write }
}

#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to standard library", issue = "none")]
/// Flags for formatting
fn flags(&mut self, flags: u32) {
pub fn flags(&mut self, flags: u32) {
self.sign = if flags & (1 << rt::Flag::SignPlus as u32) != 0 {
Some(Sign::Plus)
} else if flags & (1 << rt::Flag::SignMinus as u32) != 0 {
Expand All @@ -470,8 +472,10 @@ impl FormattingOptions {
None
};
}
#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to standard library", issue = "none")]
/// Flags for formatting
fn get_flags(&self) -> u32 {
pub fn get_flags(&self) -> u32 {
<bool as Into<u32>>::into(self.get_sign() == Some(Sign::Plus)) << rt::Flag::SignPlus as u32
| <bool as Into<u32>>::into(self.get_sign() == Some(Sign::Minus))
<< rt::Flag::SignMinus as u32
Expand Down

0 comments on commit c737858

Please sign in to comment.