Skip to content

Debug formatting floating point number does not (always) include decimal separator #47536

Closed
@sanmai-NL

Description

@sanmai-NL

In order to keep optimal equivalence between a Debug formatted representation of values and Rust source code, it would be helpful if e.g. f64 values are formatted including their decimal separator by default. This avoids having to adjust a whole lot of f64 fields in some larger structure when e.q. writing an equivalence assertion of such a value based on earlier Debug output. Currently, the values are formatted as integers when they are representable as integers.

Meta

rustc 1.25.0-nightly (79a521bb9 2018-01-15)
binary: rustc
commit-hash: 79a521bb9a8ace1a6663578a4c409906adde620d
commit-date: 2018-01-15
host: x86_64-unknown-linux-gnu
release: 1.25.0-nightly
LLVM version: 4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions