Why does fmt::Formatter have a public flags() method? Should we deprecate it? #46237
Labels
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.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
The text was updated successfully, but these errors were encountered: