Skip to content

Commit

Permalink
Specify Rust edition in rustfmt config
Browse files Browse the repository at this point in the history
rustfmt doesn't get the edition from the Cargo.toml, and provides a
really obtuse error message (that comes from rustc itself) if the
edition isn't specified in the rustfmt.toml

rust-lang/rustfmt#4454
  • Loading branch information
jhelwig committed Apr 1, 2022
1 parent cb13c5a commit a255583
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
edition = "2021"
fn_single_line = true
imports_layout = "Vertical"
imports_granularity = "Crate"
Expand Down

0 comments on commit a255583

Please sign in to comment.