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

Not doing anything on a simple piece of code #4183

Closed
sylvestre opened this issue May 18, 2020 · 2 comments
Closed

Not doing anything on a simple piece of code #4183

sylvestre opened this issue May 18, 2020 · 2 comments

Comments

@sylvestre
Copy link

sylvestre commented May 18, 2020

rustfmt isn't doing anything on the following code:

pub fn uumain(args: Vec<String>) -> i32 {
    let matches = App::new(executable!())
        .arg(            Arg::with_name(OPT_CHANGE)
            .short("c").long("ch")
)
        .arg(
            Arg::with_name(OPT_DEREFERENCE).help("aazezae affect the referent of each symbolic link this is qthe default the symbolic link itself"));
}

which is obviously incorrect formatted
(I am experiencing the same issue on a file which compiles)

$ rustfmt --check a.rs ; echo $?
0

with rustfmt 1.4.12-stable (a828ffe 2020-03-11)

@sylvestre
Copy link
Author

This is because help(STRING) is too long. But rustfmt should still try to reformat the rest.

@calebcartwright
Copy link
Member

Closing as a duplicate in favor of #3863

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

3 participants