Closed
Description
https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.flags
impl<'a> Formatter<'a> {
// ...
/// Flags for formatting
#[stable(feature = "rust1", since = "1.0.0")]
pub fn flags(&self) -> u32 { self.flags }
}
This method is public, but its documentation doesn’t say anything about the meaning of the return value. The bit indices to interpret it are given by the numerical value of variants of the FlagV1
enum. But that enum is private, and all of that information is exposed in other public methods (sign_plus
, sign_minus
, alternate
, sign_aware_zero_pad
) so it looks like the details of that encoding are intended to be private.
It looks like there is no way of using that method without making assumptions about private implementation details that we might want to change. Should we document it as such and deprecate it?
CC @rust-lang/libs