11use anyhow:: { anyhow, Context as _} ;
22use cargo:: core:: { features, CliUnstable } ;
3- use cargo:: util:: config :: TermConfig ;
3+ use cargo:: util:: context :: TermConfig ;
44use cargo:: { drop_print, drop_println, CargoResult } ;
55use clap:: builder:: UnknownArgumentValueParser ;
66use itertools:: Itertools ;
@@ -57,21 +57,21 @@ pub fn main(gctx: &mut GlobalContext) -> CliResult {
5757 == Some ( "help" )
5858 {
5959 // Don't let config errors get in the way of parsing arguments
60- let _ = config_configure ( gctx, & expanded_args, None , global_args, None ) ;
60+ let _ = configure_gctx ( gctx, & expanded_args, None , global_args, None ) ;
6161 print_zhelp ( gctx) ;
6262 } else if expanded_args. flag ( "version" ) {
6363 // Don't let config errors get in the way of parsing arguments
64- let _ = config_configure ( gctx, & expanded_args, None , global_args, None ) ;
64+ let _ = configure_gctx ( gctx, & expanded_args, None , global_args, None ) ;
6565 let version = get_version_string ( is_verbose) ;
6666 drop_print ! ( gctx, "{}" , version) ;
6767 } else if let Some ( code) = expanded_args. get_one :: < String > ( "explain" ) {
6868 // Don't let config errors get in the way of parsing arguments
69- let _ = config_configure ( gctx, & expanded_args, None , global_args, None ) ;
69+ let _ = configure_gctx ( gctx, & expanded_args, None , global_args, None ) ;
7070 let mut procss = gctx. load_global_rustc ( None ) ?. process ( ) ;
7171 procss. arg ( "--explain" ) . arg ( code) . exec ( ) ?;
7272 } else if expanded_args. flag ( "list" ) {
7373 // Don't let config errors get in the way of parsing arguments
74- let _ = config_configure ( gctx, & expanded_args, None , global_args, None ) ;
74+ let _ = configure_gctx ( gctx, & expanded_args, None , global_args, None ) ;
7575 print_list ( gctx, is_verbose) ;
7676 } else {
7777 let ( cmd, subcommand_args) = match expanded_args. subcommand ( ) {
@@ -83,7 +83,7 @@ pub fn main(gctx: &mut GlobalContext) -> CliResult {
8383 }
8484 } ;
8585 let exec = Exec :: infer ( cmd) ?;
86- config_configure (
86+ configure_gctx (
8787 gctx,
8888 & expanded_args,
8989 Some ( subcommand_args) ,
@@ -377,7 +377,7 @@ For more information, see issue #12207 <https://github.com/rust-lang/cargo/issue
377377 Ok ( ( args, GlobalArgs :: default ( ) ) )
378378}
379379
380- fn config_configure (
380+ fn configure_gctx (
381381 gctx : & mut GlobalContext ,
382382 args : & ArgMatches ,
383383 subcommand_args : Option < & ArgMatches > ,
0 commit comments