@@ -759,7 +759,9 @@ unstable_cli_options!(
759759 avoid_dev_deps: bool = ( "Avoid installing dev-dependencies if possible" ) ,
760760 binary_dep_depinfo: bool = ( "Track changes to dependency artifacts" ) ,
761761 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" ) ]
762763 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" ) ]
763765 build_std_features: Option <Vec <String >> = ( "Configure features enabled for the standard library itself when building the standard library" ) ,
764766 cargo_lints: bool = ( "Enable the `[lints.cargo]` table" ) ,
765767 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.";
872874const STABILIZED_CHECK_CFG : & str =
873875 "Compile-time checking of conditional (a.k.a. `-Zcheck-cfg`) is now always enabled." ;
874876
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+
875895#[ derive( Debug , Copy , Clone , Default , Deserialize , Ord , PartialOrd , Eq , PartialEq ) ]
876896#[ serde( default ) ]
877897pub struct GitFeatures {
0 commit comments