Skip to content

Remove hard coded edition fallback #531

@alerque

Description

@alerque

This hard coded edition is becoming a problem:

return '--edition 2018'

There are multiple issues related to this open already but for very specific symptoms. I think the best early move would be to just remove the hard coded fallback entirely. The rustfmt program itself has it's own fallback mechanism, and people can use the options to pass a default if they want.

The issue now is that rustfmt refuses to accept the argument being specified twice and any attempt to use the currently available settings to use the users preferred fallback results in an error.

The idea of also parsing Cargo.toml has been floated in comments on other issues, but I would suggest it would be better to let users specify their rustfmt_command as cargo fmt -- instead which would accomplish that. Again this solution is currently blocked because it gets overridden by hard coded argument!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions