Skip to content

padding in format args doesn't work with debug impls #46006

Closed
@nikomatsakis

Description

@nikomatsakis

This:

fn main() {
    println!("Hello {0:5}!", "x");
}

prints what I expect:

Hello x    !

But this:

fn main() {
    println!("Hello {0:5?}!", "x");
}

prints Hello "x"! (play), not:

Hello "x"  !

Is this intentional? If so, the format docs are pretty misleading. Otherwise, a regression perhaps? I'm not sure what is...T-libs?

cc @alexcrichton

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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