@@ -784,7 +784,10 @@ async fn default_(
784784 if let Some ( ( toolchain, source) ) = cfg. active_toolchain ( ) ?
785785 && !matches ! ( source, ActiveSource :: Default )
786786 {
787- info ! ( "note that the toolchain '{toolchain}' is currently in use ({source})" ) ;
787+ info ! (
788+ "note that the toolchain '{toolchain}' is currently in use ({})" ,
789+ source. to_reason( )
790+ ) ;
788791 }
789792 } else {
790793 let default_toolchain = cfg
@@ -1004,7 +1007,7 @@ async fn update(
10041007 } else if ensure_active_toolchain {
10051008 let ( toolchain, source) = cfg. ensure_active_toolchain ( force_non_host, true ) . await ?;
10061009 info ! ( "the active toolchain `{toolchain}` has been installed" ) ;
1007- info ! ( "it's active because: {source}" ) ;
1010+ info ! ( "it's active because: {}" , source . to_reason ( ) ) ;
10081011 } else {
10091012 exit_code &= common:: update_all_channels ( cfg, opts. force ) . await ?;
10101013 if self_update {
@@ -1180,7 +1183,7 @@ async fn show(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::ExitCode> {
11801183 & active_source,
11811184 ) ?;
11821185 writeln ! ( t. lock( ) , "name: {}" , active_toolchain. name( ) ) ?;
1183- writeln ! ( t. lock( ) , "active because: {active_source}" ) ?;
1186+ writeln ! ( t. lock( ) , "active because: {}" , active_source . to_reason ( ) ) ?;
11841187 if verbose {
11851188 writeln ! ( t. lock( ) , "compiler: {}" , active_toolchain. rustc_version( ) ) ?;
11861189 writeln ! ( t. lock( ) , "path: {}" , active_toolchain. path( ) . display( ) ) ?;
@@ -1221,7 +1224,7 @@ async fn show_active_toolchain(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::Ex
12211224 cfg. process. stdout( ) . lock( ) ,
12221225 "{}\n active because: {}\n compiler: {}\n path: {}" ,
12231226 toolchain. name( ) ,
1224- source,
1227+ source. to_reason ( ) ,
12251228 toolchain. rustc_version( ) ,
12261229 toolchain. path( ) . display( )
12271230 ) ?;
@@ -1232,7 +1235,7 @@ async fn show_active_toolchain(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::Ex
12321235 toolchain. name( ) ,
12331236 match source {
12341237 ActiveSource :: Default => & "default" as & dyn fmt:: Display ,
1235- _ => & source,
1238+ _ => & source. to_reason ( ) ,
12361239 }
12371240 ) ?;
12381241 }
0 commit comments