@@ -759,7 +759,9 @@ unstable_cli_options!(
759
759
avoid_dev_deps: bool = ( "Avoid installing dev-dependencies if possible" ) ,
760
760
binary_dep_depinfo: bool = ( "Track changes to dependency artifacts" ) ,
761
761
bindeps: bool = ( "Allow Cargo packages to depend on bin, cdylib, and staticlib crates, and use the artifacts built by those crates" ) ,
762
+ #[ serde( deserialize_with = "deserialize_comma_separated_list" ) ]
762
763
build_std: Option <Vec <String >> = ( "Enable Cargo to compile the standard library itself as part of a crate graph compilation" ) ,
764
+ #[ serde( deserialize_with = "deserialize_comma_separated_list" ) ]
763
765
build_std_features: Option <Vec <String >> = ( "Configure features enabled for the standard library itself when building the standard library" ) ,
764
766
cargo_lints: bool = ( "Enable the `[lints.cargo]` table" ) ,
765
767
checksum_freshness: bool = ( "Use a checksum to determine if output is fresh rather than filesystem mtime" ) ,
@@ -872,6 +874,24 @@ const STABILIZED_LINTS: &str = "The `[lints]` table is now always available.";
872
874
const STABILIZED_CHECK_CFG : & str =
873
875
"Compile-time checking of conditional (a.k.a. `-Zcheck-cfg`) is now always enabled." ;
874
876
877
+ fn deserialize_comma_separated_list < ' de , D > (
878
+ deserializer : D ,
879
+ ) -> Result < Option < Vec < String > > , D :: Error >
880
+ where
881
+ D : serde:: Deserializer < ' de > ,
882
+ {
883
+ let Some ( list) = <Option < Vec < String > > >:: deserialize ( deserializer) ? else {
884
+ return Ok ( None ) ;
885
+ } ;
886
+ let v = list
887
+ . iter ( )
888
+ . flat_map ( |s| s. split ( ',' ) )
889
+ . filter ( |s| !s. is_empty ( ) )
890
+ . map ( String :: from)
891
+ . collect ( ) ;
892
+ Ok ( Some ( v) )
893
+ }
894
+
875
895
#[ derive( Debug , Copy , Clone , Default , Deserialize , Ord , PartialOrd , Eq , PartialEq ) ]
876
896
#[ serde( default ) ]
877
897
pub struct GitFeatures {
0 commit comments