Skip to content

Commit 6a0a47a

Browse files
authored
Merge pull request #743 from lqd/edition-2021-feature
2 parents 51fbbbc + 3b9cbd2 commit 6a0a47a

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ fn main() {
2020
let mut cargo_toml: Value = toml::from_str(&input)
2121
.unwrap_or_else(|e| panic!("Cannot parse {} as TOML: {}", input_filename.display(), e));
2222

23-
if env::var_os("PLAYGROUND_FEATURE_EDITION2021").is_some() {
24-
cargo_toml = set_feature_edition2021(cargo_toml);
25-
}
26-
2723
if let Ok(edition) = env::var("PLAYGROUND_EDITION") {
2824
cargo_toml = set_edition(cargo_toml, &edition);
2925
}
@@ -66,22 +62,6 @@ fn ensure_string_in_vec(values: &mut Vec<String>, val: &str) {
6662
}
6763
}
6864

69-
fn set_feature_edition2021(cargo_toml: Value) -> Value {
70-
#[derive(Debug, Serialize, Deserialize)]
71-
#[serde(rename_all = "kebab-case")]
72-
struct CargoToml {
73-
#[serde(default)]
74-
cargo_features: Vec<String>,
75-
#[serde(flatten)]
76-
other: Other,
77-
}
78-
79-
modify(cargo_toml, |mut cargo_toml: CargoToml| {
80-
ensure_string_in_vec(&mut cargo_toml.cargo_features, "edition2021");
81-
cargo_toml
82-
})
83-
}
84-
8565
fn set_edition(cargo_toml: Value, edition: &str) -> Value {
8666
#[derive(Debug, Serialize, Deserialize)]
8767
#[serde(rename_all = "kebab-case")]

ui/src/sandbox.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -753,10 +753,6 @@ impl DockerCommandExt for Command {
753753

754754
fn apply_edition(&mut self, req: impl EditionRequest) {
755755
if let Some(edition) = req.edition() {
756-
if edition == Edition::Rust2021 {
757-
self.args(&["--env", &format!("PLAYGROUND_FEATURE_EDITION2021=true")]);
758-
}
759-
760756
self.args(&["--env", &format!("PLAYGROUND_EDITION={}", edition.cargo_ident())]);
761757
}
762758
}

0 commit comments

Comments
 (0)