-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
absent precision parameter for floating point format string is undocumented #131159
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
A-floating-point
Area: Floating point numbers and arithmetic
A-fmt
Area: `core::fmt`
C-bug
Category: This is a bug.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Comments
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 6, 2025
error on empty precision Fixes rust-lang#131159 by erroring on missing precision. Alternatively we could document current behavior.
hkBst
added a commit
to hkBst/polyfit-residuals
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/rano
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/simple_optimization
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/xxd-rs
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/yaxpeax-arm
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/tusk
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/wordle-dee
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/octree-art
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/Estatisticas_Descritivas
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/mmo
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/astrors
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/SpriteWriter-ForNES
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/aoc2020
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/Genetic-Algorithm-SalaryMan
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/aoc2023-rust
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/sudoku_solver
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/splitter
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/Alt-project-rust
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/nuklear
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/jaylox
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/kryl_04
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/math-algorithm-book
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/polars
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
hkBst
added a commit
to hkBst/srgb.rs
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
mina86
pushed a commit
to mina86/srgb.rs
that referenced
this issue
Feb 8, 2025
A format precision specifier consisting of a dot and no number actually does nothing and has no specified meaning. Currently this is silently ignored, but it may turn into a warning or error. See rust-lang/rust#131159 and rust-lang/rust#136638
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
A-floating-point
Area: Floating point numbers and arithmetic
A-fmt
Area: `core::fmt`
C-bug
Category: This is a bug.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
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
whereN
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".The text was updated successfully, but these errors were encountered: