Skip to content

Commit 71672f3

Browse files
PatchMixolydiccalebcartwright
authored andcommitted
Allow --edition 2021 to be passed to rustfmt
This was added to Configurations.md in #4618, but the option wasn't actually made available. This should let people who are using Rust 2021 on nightly rustc run `cargo fmt` again.
1 parent 82eaff2 commit 71672f3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ fn edition_from_edition_str(edition_str: &str) -> Result<Edition> {
689689
match edition_str {
690690
"2015" => Ok(Edition::Edition2015),
691691
"2018" => Ok(Edition::Edition2018),
692+
"2021" => Ok(Edition::Edition2021),
692693
_ => Err(format_err!("Invalid value for `--edition`")),
693694
}
694695
}

0 commit comments

Comments
 (0)