Closed
Description
Location
https://doc.rust-lang.org/std/macro.todo.html
Summary
The documentation of the todo!
macro currently does not mention at all that it also accepts optional format arguments, for example:
todo!("with {}", 1);
Other macros like unimplemented!
at least have the following sentence under "Panics":
Like
panic!
, this macro has a second form for displaying custom values.
So maybe it would be good to do the following?
- Update the "Panics" section to be similar to https://doc.rust-lang.org/std/macro.unimplemented.html#panicsExtend / adjust example to also show usage of custom message
Activity
Colonial-Dev commentedon Oct 1, 2023
@rustbot claim
Colonial-Dev commentedon Oct 2, 2023
Any opinions?
I mostly drew from the docs for
unimplemented!
, and I also took the liberty of cleaning up some of the formatting/typography.Marcono1234 commentedon Oct 2, 2023
Thanks! To me this looks good, but I don't know what the maintainers think.
todo!
documentation to mention displaying custom values #116363Rollup merge of rust-lang#116363 - Colonial-Dev:issue-116130-fix, r=t…
Unrolled build for rust-lang#116363