@@ -1148,7 +1148,8 @@ impl CliUnstable {
1148
1148
}
1149
1149
}
1150
1150
1151
- fn parse_features ( value : Option < & str > ) -> Vec < String > {
1151
+ /// Parse a comma-separated list
1152
+ fn parse_list ( value : Option < & str > ) -> Vec < String > {
1152
1153
match value {
1153
1154
None => Vec :: new ( ) ,
1154
1155
Some ( "" ) => Vec :: new ( ) ,
@@ -1197,7 +1198,7 @@ impl CliUnstable {
1197
1198
match k {
1198
1199
// Permanently unstable features
1199
1200
// Sorted alphabetically:
1200
- "allow-features" => self . allow_features = Some ( parse_features ( v) . into_iter ( ) . collect ( ) ) ,
1201
+ "allow-features" => self . allow_features = Some ( parse_list ( v) . into_iter ( ) . collect ( ) ) ,
1201
1202
"print-im-a-teapot" => self . print_im_a_teapot = parse_bool ( k, v) ?,
1202
1203
1203
1204
// Stabilized features
@@ -1216,7 +1217,7 @@ impl CliUnstable {
1216
1217
// until we feel confident to remove entirely.
1217
1218
//
1218
1219
// See rust-lang/cargo#11168
1219
- let feats = parse_features ( v) ;
1220
+ let feats = parse_list ( v) ;
1220
1221
let stab_is_not_empty = feats. iter ( ) . any ( |feat| {
1221
1222
matches ! (
1222
1223
feat. as_str( ) ,
@@ -1259,7 +1260,7 @@ impl CliUnstable {
1259
1260
"build-std" => {
1260
1261
self . build_std = Some ( crate :: core:: compiler:: standard_lib:: parse_unstable_flag ( v) )
1261
1262
}
1262
- "build-std-features" => self . build_std_features = Some ( parse_features ( v) ) ,
1263
+ "build-std-features" => self . build_std_features = Some ( parse_list ( v) ) ,
1263
1264
"cargo-lints" => self . cargo_lints = parse_empty ( k, v) ?,
1264
1265
"codegen-backend" => self . codegen_backend = parse_empty ( k, v) ?,
1265
1266
"config-include" => self . config_include = parse_empty ( k, v) ?,
0 commit comments