Skip to content

dbg! put spaces around :: #81209

Closed
Closed
@pickfire

Description

@pickfire

While trying out Ipv4Addr for #81202

I tried this code:

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d4e00191c64a2608f3306178bff743c8

use std::net::Ipv4Addr;

fn main() {
    dbg!(format!("{:#?}", Ipv4Addr::new(127, 0, 0, 1)));
}

I expected to see this happen:

[src/main.rs:4] format!("{:#?}", Ipv4Addr::new(127, 0, 0, 1)) = "127.0.0.1"

Instead, this happened:

[src/main.rs:4] format!("{:#?}", Ipv4Addr :: new(127, 0, 0, 1)) = "127.0.0.1"

Meta

rustc --version --verbose: Same happens for nightly

rustc 1.49.0 (e1884a8e3 2020-12-29)
binary: rustc
commit-hash: e1884a8e3c3e813aada8254edfa120e85bf5ffca
commit-date: 2020-12-29
host: x86_64-unknown-linux-gnu
release: 1.49.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-prettyArea: Pretty printing (including `-Z unpretty`)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler 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