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

Add edition to .rustfmt.toml #1663

Merged
merged 1 commit into from
Sep 4, 2024
Merged

Add edition to .rustfmt.toml #1663

merged 1 commit into from
Sep 4, 2024

Commits on Sep 4, 2024

  1. Add edition to .rustfmt.toml

    When invoked standalone (i.e. not through `cargo fmt`), `rustfmt` does not respect the edition (or any other configuration) in `Cargo.toml`, instead relying solely on `rustfmt.toml` or `.rustfmt.toml`. My editor automatically invokes `rustfmt` on individual files on save. Unless `rustfmt` sees a specified edition, it assumes 2018, and rejects any code that uses `async`. This is a huge pain.
    
    Specify `edition = "2021"` in `.rustfmt.toml` so that standalone `rustfmt` works.
    
    Signed-off-by: Phoebe Goldman <phoebe@clockworklabs.io>
    gefjon authored Sep 4, 2024
    Configuration menu
    Copy the full SHA
    778f48e View commit details
    Browse the repository at this point in the history