You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ErikMcClure opened this issue
Aug 5, 2024
· 1 comment
· Fixed by #129001
Labels
A-docsArea: documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.
The docs for write_fmt in Formatter do not line up with the docs for write_fmt in the Write trait. The write trait warns you that you should be using the write! macro, but the method in Formatter doesn't. If you are implementing core::fmt::Debug and call write_fmt on the provided Formatter object directly, and use the wrong arguments, the rust-analyzer error will use Formatter docs, which will mislead the user into simply wrapping the arguments via format_args! instead of using a write! macro.
The text was updated successfully, but these errors were encountered:
ErikMcClure
added
the
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
label
Aug 5, 2024
sounds reasonable, feel free to make a PR adding it.
Noratrieb
added
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Aug 7, 2024
A-docsArea: documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.
Location
Formatter::write_fmt
Summary
The docs for
write_fmt
in Formatter do not line up with the docs forwrite_fmt
in the Write trait. The write trait warns you that you should be using thewrite!
macro, but the method inFormatter
doesn't. If you are implementingcore::fmt::Debug
and callwrite_fmt
on the providedFormatter
object directly, and use the wrong arguments, the rust-analyzer error will useFormatter
docs, which will mislead the user into simply wrapping the arguments viaformat_args!
instead of using awrite!
macro.The text was updated successfully, but these errors were encountered: