Skip to content

Commit

Permalink
Merge pull request #1062 from foresterre/edition2024
Browse files Browse the repository at this point in the history
  • Loading branch information
foresterre authored Nov 21, 2024
2 parents 0d21845 + f19ce0c commit 8f83131
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ the [discussions section](https://github.com/foresterre/cargo-msrv/discussions).

## Unreleased

## [0.17.0] - 2024-11-21

### Added

* Rust edition 2024 can now be detected

[0.17.0]: https://github.com/foresterre/cargo-msrv/compare/v0.16.3...v0.17.0

## [0.16.3] - 2024-11-11

### Added
Expand Down
4 changes: 4 additions & 0 deletions src/cli/rust_releases_opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub enum Edition {
Edition2015,
Edition2018,
Edition2021,
Edition2024,
}

impl FromStr for Edition {
Expand All @@ -62,6 +63,7 @@ impl FromStr for Edition {
"2015" => Ok(Self::Edition2015),
"2018" => Ok(Self::Edition2018),
"2021" => Ok(Self::Edition2021),
"2024" => Ok(Self::Edition2024),
unknown => Err(ParseEditionError::UnknownEdition(unknown.to_string())),
}
}
Expand All @@ -73,6 +75,8 @@ impl Edition {
Self::Edition2015 => BareVersion::ThreeComponents(1, 0, 0),
Self::Edition2018 => BareVersion::ThreeComponents(1, 31, 0),
Self::Edition2021 => BareVersion::ThreeComponents(1, 56, 0),
// Actual stable version is pending; planning: https://doc.rust-lang.org/nightly/edition-guide/rust-2024/index.html
Self::Edition2024 => BareVersion::ThreeComponents(1, 85, 0),
}
}
}
Expand Down

0 comments on commit 8f83131

Please sign in to comment.