-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
format!() ignores width when displaying enums #67162
Copy link
Copy link
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Similar to the issue reported in #55584 (and #55749), the width parameter is ignored when displaying enums, e.g. this fails:
Playground Example
Notice this is with
Display, notDebug. There's some question in the linked issues what the desired behavior forDebugis, but I think it's a bug thatDisplayformatting would not respect width (and precision).I'd be willing to take a crack at fixing this if I could get some code pointers.