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

Beginning-of-line detection in pretty-printer isn't reliable #751

Closed
marijnh opened this issue Jul 27, 2011 · 4 comments
Closed

Beginning-of-line detection in pretty-printer isn't reliable #751

marijnh opened this issue Jul 27, 2011 · 4 comments
Labels
A-pretty Area: Pretty printing.

Comments

@marijnh
Copy link
Contributor

marijnh commented Jul 27, 2011

It only recognizes 'hard' line breaks. Spaces might also cause lines to be broken. This program ends up with an extra blank line above the comment because of this:

fn main() {
    let x = Foo {x: 10, y: 10000000000,
             // This a comment
             z: 45000000000000000,
             q: 2444444444444444};
}
@emberian
Copy link
Member

Still reproducible.

@pnkfelix
Copy link
Member

linking to the metabug #3195 so that this ticket gets an entry (with status) in its comments area.

@huonw
Copy link
Member

huonw commented Feb 8, 2014

Updated example, still reproduces.

@brson
Copy link
Contributor

brson commented Jan 13, 2015

Nobody is ever going to fix the current pretty-printer. Closing.

@brson brson closed this as completed Jan 13, 2015
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pretty Area: Pretty printing.
Projects
None yet
Development

No branches or pull requests

7 participants