Skip to content

Commit

Permalink
Allow --edition 2021 to be passed to rustfmt
Browse files Browse the repository at this point in the history
This was added to Configurations.md in rust-lang#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.
  • Loading branch information
PatchMixolydic authored and calebcartwright committed Jul 26, 2021
1 parent bfd479d commit 75765f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ fn edition_from_edition_str(edition_str: &str) -> Result<Edition> {
match edition_str {
"2015" => Ok(Edition::Edition2015),
"2018" => Ok(Edition::Edition2018),
"2021" => Ok(Edition::Edition2021),
_ => Err(format_err!("Invalid value for `--edition`")),
}
}
Expand Down

0 comments on commit 75765f6

Please sign in to comment.