@@ -782,7 +782,10 @@ async fn default_(
782782 if let Some ( ( toolchain, source) ) = cfg. active_toolchain ( ) ?
783783 && !matches ! ( source, ActiveSource :: Default )
784784 {
785- info ! ( "note that the toolchain '{toolchain}' is currently in use ({source})" ) ;
785+ info ! (
786+ "note that the toolchain '{toolchain}' is currently in use ({})" ,
787+ source. to_reason( )
788+ ) ;
786789 }
787790 } else {
788791 let default_toolchain = cfg
@@ -999,7 +1002,7 @@ async fn update(
9991002 } else if ensure_active_toolchain {
10001003 let ( toolchain, source) = cfg. ensure_active_toolchain ( force_non_host, true ) . await ?;
10011004 info ! ( "the active toolchain `{toolchain}` has been installed" ) ;
1002- info ! ( "it's active because: {source}" ) ;
1005+ info ! ( "it's active because: {}" , source . to_reason ( ) ) ;
10031006 } else {
10041007 exit_code &= common:: update_all_channels ( cfg, opts. force ) . await ?;
10051008 if self_update {
@@ -1169,7 +1172,7 @@ async fn show(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::ExitCode> {
11691172 & active_source,
11701173 ) ?;
11711174 writeln ! ( t. lock( ) , "name: {}" , active_toolchain. name( ) ) ?;
1172- writeln ! ( t. lock( ) , "active because: {active_source}" ) ?;
1175+ writeln ! ( t. lock( ) , "active because: {}" , active_source . to_reason ( ) ) ?;
11731176 if verbose {
11741177 writeln ! ( t. lock( ) , "compiler: {}" , active_toolchain. rustc_version( ) ) ?;
11751178 writeln ! ( t. lock( ) , "path: {}" , active_toolchain. path( ) . display( ) ) ?;
@@ -1212,7 +1215,7 @@ async fn show_active_toolchain(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::Ex
12121215 cfg. process. stdout( ) . lock( ) ,
12131216 "{}\n active because: {}\n compiler: {}\n path: {}" ,
12141217 toolchain. name( ) ,
1215- source,
1218+ source. to_reason ( ) ,
12161219 toolchain. rustc_version( ) ,
12171220 toolchain. path( ) . display( )
12181221 ) ?;
@@ -1223,7 +1226,7 @@ async fn show_active_toolchain(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::Ex
12231226 toolchain. name( ) ,
12241227 match source {
12251228 ActiveSource :: Default => & "default" as & dyn fmt:: Display ,
1226- _ => & source,
1229+ _ => & source. to_reason ( ) ,
12271230 }
12281231 ) ?;
12291232 }
0 commit comments