File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -673,13 +673,16 @@ impl Cfg {
673673 } ;
674674
675675 if let Ok ( contents) = contents {
676- let override_file = Cfg :: parse_override_file ( contents, parse_mode) ?;
676+ let add_file_context = || format ! ( "in {}" , toolchain_file. to_string_lossy( ) ) ;
677+ let override_file = Cfg :: parse_override_file ( contents, parse_mode)
678+ . with_context ( add_file_context) ?;
677679 if let Some ( toolchain_name) = & override_file. toolchain . channel {
678- let all_toolchains = self . list_toolchains ( ) ?;
680+ let all_toolchains = self . list_toolchains ( ) . with_context ( add_file_context ) ?;
679681 if !all_toolchains. iter ( ) . any ( |s| s == toolchain_name) {
680682 // The given name is not resolvable as a toolchain, so
681683 // instead check it's plausible for installation later
682- dist:: validate_channel_name ( toolchain_name) ?;
684+ dist:: validate_channel_name ( toolchain_name)
685+ . with_context ( add_file_context) ?;
683686 }
684687 }
685688
You can’t perform that action at this time.
0 commit comments