-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Closed
Copy link
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
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
est31 and bluss
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.