Skip to content

"{:?}" for 0. is 0 instead of 0. #30967

Closed
@yongqli

Description

This code:

fn main() { 
    println!("{:?}", 0.);
}

produces 0, but I would expect 0.. This breaks the convention of Rust source code.

https://play.rust-lang.org/?gist=e1f1c703b2c582ddc3c3&version=nightly

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions