Skip to content

Fill/Alignment is ignored for Debug #30573

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

Closed
stepancheg opened this issue Dec 27, 2015 · 2 comments
Closed

Fill/Alignment is ignored for Debug #30573

stepancheg opened this issue Dec 27, 2015 · 2 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@stepancheg
Copy link
Contributor

Code:

println!("<<<{:>10}>>>", "abcd");
println!("<<<{:>10?}>>>", "abcd");

outputs:

<<<      abcd>>>
<<<"abcd">>>

First version is padded, second is not.

Debug output should be padded, or it should be a compilation error at least.

Playpen

@alexcrichton
Copy link
Member

Various formatting flags like this are ignored by almost all formatting implementations, so I don't think it's possible to yield a compilation error. That being said there's a case that perhaps the standard Debug implementations should respect this, as well as the debug builders.

@steveklabnik steveklabnik added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed A-libs labels Mar 24, 2017
@Mark-Simulacrum
Copy link
Member

Closing in favor of #30164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants