@@ -534,7 +534,7 @@ impl<'a> Cfg<'a> {
534
534
& self ,
535
535
) -> Result < Option < ( LocalToolchainName , ActiveReason ) > > {
536
536
Ok (
537
- if let Some ( ( override_config, reason) ) = self . find_override_config ( & self . current_dir ) ? {
537
+ if let Some ( ( override_config, reason) ) = self . find_override_config ( ) ? {
538
538
Some ( ( override_config. into_local_toolchain_name ( ) , reason) )
539
539
} else {
540
540
self . get_default ( ) ?
@@ -543,7 +543,7 @@ impl<'a> Cfg<'a> {
543
543
)
544
544
}
545
545
546
- fn find_override_config ( & self , path : & Path ) -> Result < Option < ( OverrideCfg , ActiveReason ) > > {
546
+ fn find_override_config ( & self ) -> Result < Option < ( OverrideCfg , ActiveReason ) > > {
547
547
let override_config: Option < ( OverrideCfg , ActiveReason ) > =
548
548
// First check +toolchain override from the command line
549
549
if let Some ( ref name) = self . toolchain_override {
@@ -562,7 +562,7 @@ impl<'a> Cfg<'a> {
562
562
// directory in the override database, or a `rust-toolchain{.toml}` file,
563
563
// in that order.
564
564
else if let Some ( ( override_cfg, active_reason) ) = self . settings_file . with ( |s| {
565
- self . find_override_from_dir_walk ( path , s)
565
+ self . find_override_from_dir_walk ( & self . current_dir , s)
566
566
} ) ? {
567
567
Some ( ( override_cfg, active_reason) )
568
568
}
@@ -755,7 +755,7 @@ impl<'a> Cfg<'a> {
755
755
756
756
#[ cfg_attr( feature = "otel" , tracing:: instrument( skip_all) ) ]
757
757
async fn find_or_install_active_toolchain ( & ' a self ) -> Result < ( Toolchain < ' a > , ActiveReason ) > {
758
- match self . find_override_config ( & self . current_dir ) ? {
758
+ match self . find_override_config ( ) ? {
759
759
Some ( ( override_config, reason) ) => match override_config {
760
760
OverrideCfg :: PathBased ( path_based_name) => {
761
761
let toolchain = Toolchain :: with_reason ( self , path_based_name. into ( ) , & reason) ?;
0 commit comments