Skip to content

if-let guard formatting #4955

Closed
Closed
@LeSeulArtichaut

Description

@LeSeulArtichaut

if let guard formatting seems to be unsupported in rustfmt:

// This isn't rewritten
fn main() {
    match foo {
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa if let Some(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) = ccccccccccccccccccccccccccccccccccccccccccccccccc => {}
    }
}

cc rust-lang/rfcs#2294 rust-lang/rust#51114

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked on rustc, an RFC, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions