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 authored and gitbot committed Feb 20, 2025
1 parent 253cd52 commit 21d3717
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,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 @@ -478,8 +480,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 21d3717

Please sign in to comment.