Skip to content

Commit b352356

Browse files
authored
Merge pull request #1129 from rust-lang/edition-2024
No longer set the Cargo feature for edition 2024
2 parents 647eaae + eb30c6f commit b352356

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

compiler/base/modify-cargo-toml/src/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,6 @@ fn ensure_string_in_vec(values: &mut Vec<String>, val: &str) {
2626
}
2727
}
2828

29-
pub fn set_feature_edition2024(cargo_toml: Value) -> Value {
30-
#[derive(Debug, Serialize, Deserialize)]
31-
#[serde(rename_all = "kebab-case")]
32-
struct CargoToml {
33-
#[serde(default)]
34-
cargo_features: Vec<String>,
35-
#[serde(flatten)]
36-
other: Other,
37-
}
38-
39-
modify(cargo_toml, |mut cargo_toml: CargoToml| {
40-
ensure_string_in_vec(&mut cargo_toml.cargo_features, "edition2024");
41-
cargo_toml
42-
})
43-
}
44-
4529
pub fn set_edition(cargo_toml: Value, edition: &str) -> Value {
4630
#[derive(Debug, Serialize, Deserialize)]
4731
#[serde(rename_all = "kebab-case")]

compiler/base/orchestrator/src/coordinator.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,6 @@ impl LowerRequest for ExecuteRequest {
401401

402402
impl CargoTomlModifier for ExecuteRequest {
403403
fn modify_cargo_toml(&self, mut cargo_toml: toml::Value) -> toml::Value {
404-
if self.edition == Edition::Rust2024 {
405-
cargo_toml = modify_cargo_toml::set_feature_edition2024(cargo_toml);
406-
}
407-
408404
cargo_toml = modify_cargo_toml::set_edition(cargo_toml, self.edition.to_cargo_toml_key());
409405

410406
if let Some(crate_type) = self.crate_type.to_library_cargo_toml_key() {
@@ -534,10 +530,6 @@ impl LowerRequest for CompileRequest {
534530

535531
impl CargoTomlModifier for CompileRequest {
536532
fn modify_cargo_toml(&self, mut cargo_toml: toml::Value) -> toml::Value {
537-
if self.edition == Edition::Rust2024 {
538-
cargo_toml = modify_cargo_toml::set_feature_edition2024(cargo_toml);
539-
}
540-
541533
cargo_toml = modify_cargo_toml::set_edition(cargo_toml, self.edition.to_cargo_toml_key());
542534

543535
if let Some(crate_type) = self.crate_type.to_library_cargo_toml_key() {
@@ -597,10 +589,6 @@ impl LowerRequest for FormatRequest {
597589

598590
impl CargoTomlModifier for FormatRequest {
599591
fn modify_cargo_toml(&self, mut cargo_toml: toml::Value) -> toml::Value {
600-
if self.edition == Edition::Rust2024 {
601-
cargo_toml = modify_cargo_toml::set_feature_edition2024(cargo_toml);
602-
}
603-
604592
cargo_toml = modify_cargo_toml::set_edition(cargo_toml, self.edition.to_cargo_toml_key());
605593

606594
if let Some(crate_type) = self.crate_type.to_library_cargo_toml_key() {
@@ -646,10 +634,6 @@ impl LowerRequest for ClippyRequest {
646634

647635
impl CargoTomlModifier for ClippyRequest {
648636
fn modify_cargo_toml(&self, mut cargo_toml: toml::Value) -> toml::Value {
649-
if self.edition == Edition::Rust2024 {
650-
cargo_toml = modify_cargo_toml::set_feature_edition2024(cargo_toml);
651-
}
652-
653637
cargo_toml = modify_cargo_toml::set_edition(cargo_toml, self.edition.to_cargo_toml_key());
654638

655639
if let Some(crate_type) = self.crate_type.to_library_cargo_toml_key() {
@@ -694,10 +678,6 @@ impl LowerRequest for MiriRequest {
694678

695679
impl CargoTomlModifier for MiriRequest {
696680
fn modify_cargo_toml(&self, mut cargo_toml: toml::Value) -> toml::Value {
697-
if self.edition == Edition::Rust2024 {
698-
cargo_toml = modify_cargo_toml::set_feature_edition2024(cargo_toml);
699-
}
700-
701681
cargo_toml = modify_cargo_toml::set_edition(cargo_toml, self.edition.to_cargo_toml_key());
702682

703683
if let Some(crate_type) = self.crate_type.to_library_cargo_toml_key() {
@@ -744,10 +724,6 @@ impl LowerRequest for MacroExpansionRequest {
744724

745725
impl CargoTomlModifier for MacroExpansionRequest {
746726
fn modify_cargo_toml(&self, mut cargo_toml: toml::Value) -> toml::Value {
747-
if self.edition == Edition::Rust2024 {
748-
cargo_toml = modify_cargo_toml::set_feature_edition2024(cargo_toml);
749-
}
750-
751727
cargo_toml = modify_cargo_toml::set_edition(cargo_toml, self.edition.to_cargo_toml_key());
752728

753729
if let Some(crate_type) = self.crate_type.to_library_cargo_toml_key() {

0 commit comments

Comments
 (0)