Open
Description
I am talking about format strings of the form format!"{:.}", 1.234)
. The corresponding documentation for the precision argument is here. The documentation writes that the format is .N
where N
is an integer specifying the precision.
The bug is that it is not documented that N
can also be absent. Either this should not be accepted by the compiler or it should be documented.
I believe the intention is that an absent N
means the same thing as if there was no precision specified at all (no :.
). Note that this is not the same as "as much precision as needed".
Activity
hkBst commentedon Jan 23, 2025
This is parsed here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse_format/src/lib.rs#L707
Auto merge of rust-lang#136638 - hkBst:format_parse, r=<try>
Remove empty format precision specifier
Remove empty format precision specifier
103 remaining items