File tree Expand file tree Collapse file tree 2 files changed +0
-24
lines changed
compiler/base/modify-cargo-toml/src Expand file tree Collapse file tree 2 files changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,6 @@ fn main() {
20
20
let mut cargo_toml: Value = toml:: from_str ( & input)
21
21
. unwrap_or_else ( |e| panic ! ( "Cannot parse {} as TOML: {}" , input_filename. display( ) , e) ) ;
22
22
23
- if env:: var_os ( "PLAYGROUND_FEATURE_EDITION2021" ) . is_some ( ) {
24
- cargo_toml = set_feature_edition2021 ( cargo_toml) ;
25
- }
26
-
27
23
if let Ok ( edition) = env:: var ( "PLAYGROUND_EDITION" ) {
28
24
cargo_toml = set_edition ( cargo_toml, & edition) ;
29
25
}
@@ -66,22 +62,6 @@ fn ensure_string_in_vec(values: &mut Vec<String>, val: &str) {
66
62
}
67
63
}
68
64
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
-
85
65
fn set_edition ( cargo_toml : Value , edition : & str ) -> Value {
86
66
#[ derive( Debug , Serialize , Deserialize ) ]
87
67
#[ serde( rename_all = "kebab-case" ) ]
Original file line number Diff line number Diff line change @@ -753,10 +753,6 @@ impl DockerCommandExt for Command {
753
753
754
754
fn apply_edition ( & mut self , req : impl EditionRequest ) {
755
755
if let Some ( edition) = req. edition ( ) {
756
- if edition == Edition :: Rust2021 {
757
- self . args ( & [ "--env" , & format ! ( "PLAYGROUND_FEATURE_EDITION2021=true" ) ] ) ;
758
- }
759
-
760
756
self . args ( & [ "--env" , & format ! ( "PLAYGROUND_EDITION={}" , edition. cargo_ident( ) ) ] ) ;
761
757
}
762
758
}
You can’t perform that action at this time.
0 commit comments