Skip to content

rustfmt producing invalid code #1658

@mlafeldt

Description

@mlafeldt

rustfmt 0.8.4 and current HEAD will format this:

                assert!(Syscheck::new(&mut vec![String::from("one"), String::from("two")]).is_err());

To this code, which can't be compiled:

                assert!(
                    Syscheck::new(&mut vec![String::from("one"), String::from("two")]).is_err(),
                );

We're using the config at https://github.com/rust-lang-nursery/rustfmt/blob/master/rfc-rustfmt.toml

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