- 
                Notifications
    You must be signed in to change notification settings 
- Fork 963
Closed
Labels
1x-backport:pendingFixed/resolved in source but not yet backported to a 1x branch and releaseFixed/resolved in source but not yet backported to a 1x branch and releaseA-commentsArea: commentsArea: commentsI-poor-formattingIssue: poor formattingIssue: poor formatting
Description
$ rustfmt --version
rustfmt 1.4.11-nightly (1838235 2019-12-03)
I'm not sure if this is duplicate with #3937 so filed this one.
Code:
fn main() {
    let o_num = Some(123);
    
    let x = if let Some(n) =
        // this is a test comment
        // to see if rustfmt will break
        // after using the lateset version
        o_num {
            n * 2
        } else {
            0
        };
    
    println!("Number: {}", x);
}Actual Formatted:
fn main() {
    let o_num = Some(123);
    let x = if let Some(n) =
        // this is a test comment
    // to see if rustfmt will break
    // after using the lateset version
        o_num
    {
        n * 2
    } else {
        0
    };
    println!("Number: {}", x);
}Personal Expected Formatted:
fn main() {
    let o_num = Some(123);
    let x = if let Some(n) =
        // this is a test comment
        // to see if rustfmt will break
        // after using the lateset version
        o_num
    {
        n * 2
    } else {
        0
    };
    println!("Number: {}", x);
}Metadata
Metadata
Assignees
Labels
1x-backport:pendingFixed/resolved in source but not yet backported to a 1x branch and releaseFixed/resolved in source but not yet backported to a 1x branch and releaseA-commentsArea: commentsArea: commentsI-poor-formattingIssue: poor formattingIssue: poor formatting