Skip to content

Commit

Permalink
Stop gating feature "edition2021"
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Feb 28, 2022
1 parent 74f20d2 commit 4947f09
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1137,9 +1137,13 @@ impl TomlManifest {
} else {
Edition::Edition2015
};
if edition == Edition::Edition2021 {
features.require(Feature::edition2021())?;
} else if !edition.is_stable() {
// Add these lines if start a new unstable edition.
// ```
// if edition == Edition::Edition20xx {
// features.require(Feature::edition20xx))?;
// }
// ```
if !edition.is_stable() {
// Guard in case someone forgets to add .require()
return Err(util::errors::internal(format!(
"edition {} should be gated",
Expand Down

0 comments on commit 4947f09

Please sign in to comment.