Skip to content

warn on empty precision, but only when width present#156143

Open
hkBst wants to merge 1 commit intorust-lang:mainfrom
hkBst:format_parse2
Open

warn on empty precision, but only when width present#156143
hkBst wants to merge 1 commit intorust-lang:mainfrom
hkBst:format_parse2

Conversation

@hkBst
Copy link
Copy Markdown
Member

@hkBst hkBst commented May 4, 2026

Reworking of #136638.

Fixes #131159 by warning on missing precision only if there is a width specified.

This is the only case where a previous crater run caught a bug because "{:2.?}" was written but "{:.2?}" was meant.

r? @m-ou-se

Feel free to close if this is still deemed undesirable.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

absent precision parameter for floating point format string is undocumented

3 participants