Skip to content

nightly won't unwrap trailing line comments #6199

Closed as not planned
Closed as not planned
@fowles

Description

@fowles
fn main() -> Result<(), Box<dyn std::error::Error>> {
    if false {
        return Ok(()); // 8901234567890123456789012345678901234567890
                       // 12345
    }
    if true {
        if true {
            if true {
                if true {
                    if true {
                        return Ok(()); // The workspace has been deleted
                                       // (see above)
                    }
                }
            }
        }
    }
    Ok(())
}

when formatted with

edition = "2021"
max_width = 100
wrap_comments = true
comment_width = 100

this should unwrap both line comments as they will both fit within 100 characters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions