Skip to content

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

Closed
@marijnh

Description

@marijnh

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};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-prettyArea: Pretty printing (including `-Z unpretty`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions