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

Comment after enum member prevents rustfmt from doing its work #4957

Closed
wooster0 opened this issue Aug 16, 2021 · 1 comment
Closed

Comment after enum member prevents rustfmt from doing its work #4957

wooster0 opened this issue Aug 16, 2021 · 1 comment

Comments

@wooster0
Copy link
Contributor

wooster0 commented Aug 16, 2021

The following is not formatted by rustfmt due to the comment:

use std::cmp::Ordering;

fn main() {
    match 1.cmp(&1) {
        Ordering::Greater |
        Ordering::Equal //hello


        =>       {





                                          }
        
        _=> {}
    }
}

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a33f654d34616378214d7db0e8e2cff7
I expect a formatting like this:

use std::cmp::Ordering;

fn main() {
    match 1.cmp(&1) {
        Ordering::Greater |
        Ordering::Equal //hello
        => {}
        _ => {}
    }
}
@calebcartwright
Copy link
Member

Thank you for the report but closing as a duplicate of #4119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants