Skip to content
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

Indent code past the widest line number #25037

Closed
wants to merge 2 commits into from

Conversation

tbelaire
Copy link
Contributor

@tbelaire tbelaire commented May 1, 2015

Fixes #11715

I don't know what's the best way to test this...

@rust-highfive
Copy link
Contributor

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

assert!(display_line_infos.len() > 0);
let mut max_line_num = display_line_infos[display_line_infos.len() - 1].line_index + 1;
let mut digits = 0;
while max_line_num > 0 { max_line_num /= 10; digits += 1; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit this would better to be split across multiple lines

@nrc
Copy link
Member

nrc commented May 1, 2015

It would be nice to have a test for this. Could you add a unit test for the function itself maybe? If that is possible then I guess we can land without a test. Code looks good though.

@bors
Copy link
Collaborator

bors commented Jun 11, 2015

☔ The latest upstream changes (presumably #26190) made this pull request unmergeable. Please resolve the merge conflicts.

@nrc
Copy link
Member

nrc commented Jun 25, 2015

Closing in favour of #26540

@nrc nrc closed this Jun 25, 2015
bors added a commit that referenced this pull request Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagnostic doesn't align properly in span where line number increases by one digit
4 participants