@@ -2,7 +2,7 @@ use anyhow::{anyhow, Context as _};
22use cargo:: core:: shell:: Shell ;
33use cargo:: core:: { features, CliUnstable } ;
44use cargo:: { self , drop_print, drop_println, CargoResult , CliResult , Config } ;
5- use clap:: { Arg , ArgMatches } ;
5+ use clap:: { builder :: UnknownArgumentValueParser , Arg , ArgMatches } ;
66use itertools:: Itertools ;
77use std:: collections:: HashMap ;
88use std:: ffi:: OsStr ;
@@ -618,11 +618,29 @@ See '<cyan,bold>cargo help</> <cyan><<command>></>' for more information on a sp
618618 . help_heading ( heading:: MANIFEST_OPTIONS )
619619 . global ( true ) ,
620620 )
621- . arg_config ( )
622- . arg_unstable_feature ( )
621+ . arg ( Arg :: new ( "unsupported-short-config-flag" )
622+ . help ( "" )
623+ . short ( 'c' )
624+ . value_parser ( UnknownArgumentValueParser :: suggest_arg ( "--config" ) )
625+ . action ( ArgAction :: SetTrue )
626+ . global ( true )
627+ . hide ( true ) )
628+ . arg ( multi_opt ( "config" , "KEY=VALUE" , "Override a configuration value" ) . global ( true ) )
629+ . arg ( Arg :: new ( "unsupported-lowercase-unstable-feature-flag" )
630+ . help ( "" )
631+ . short ( 'z' )
632+ . value_parser ( UnknownArgumentValueParser :: suggest_arg ( "-Z" ) )
633+ . action ( ArgAction :: SetTrue )
634+ . global ( true )
635+ . hide ( true ) )
636+ . arg ( Arg :: new ( "unstable-features" )
637+ . help ( "Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details" )
638+ . short ( 'Z' )
639+ . value_name ( "FLAG" )
640+ . action ( ArgAction :: Append )
641+ . global ( true ) )
623642 . subcommands ( commands:: builtin ( ) )
624643}
625-
626644/// Delay loading [`Config`] until access.
627645///
628646/// In the common path, the [`Config`] is dependent on CLI parsing and shouldn't be loaded until
0 commit comments