@@ -2,7 +2,7 @@ use anyhow::{anyhow, Context as _};
2
2
use cargo:: core:: shell:: Shell ;
3
3
use cargo:: core:: { features, CliUnstable } ;
4
4
use cargo:: { self , drop_print, drop_println, CargoResult , CliResult , Config } ;
5
- use clap:: { Arg , ArgMatches } ;
5
+ use clap:: { builder :: UnknownArgumentValueParser , Arg , ArgMatches } ;
6
6
use itertools:: Itertools ;
7
7
use std:: collections:: HashMap ;
8
8
use std:: ffi:: OsStr ;
@@ -618,11 +618,29 @@ See '<cyan,bold>cargo help</> <cyan><<command>></>' for more information on a sp
618
618
. help_heading ( heading:: MANIFEST_OPTIONS )
619
619
. global ( true ) ,
620
620
)
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 ) )
623
642
. subcommands ( commands:: builtin ( ) )
624
643
}
625
-
626
644
/// Delay loading [`Config`] until access.
627
645
///
628
646
/// In the common path, the [`Config`] is dependent on CLI parsing and shouldn't be loaded until
0 commit comments