format!() ignores width while formatting Debug #83361
Labels
A-fmt
Area: `core::fmt`
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Related: #55584
(playground)
shows as result
I understand from #55584 that this might be “working as intended”, though I'm not really sure I understand why.
If there are technical reasons why width-setting can't work, would it be possible to error out at compile-time (well… lint and in the next edition error) when hitting such a construct? I must say that it was my first time attempting to get dynamic width working, and I was persuaded I did something wrong until I just tried removing
Debug
and all of a sudden everything worked.And if there are practical reasons why one would not want that, would it be possible to update the documentation to make this behavior explicit? :)
The text was updated successfully, but these errors were encountered: