File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1643,6 +1643,11 @@ impl Config {
16431643 /// Looks for a path for `tool` in an environment variable or config path, defaulting to `tool`
16441644 /// as a path.
16451645 fn get_tool ( & self , tool : & str , from_config : & Option < ConfigRelativePath > ) -> PathBuf {
1646+ // This function is designed to only work with rustup proxies. This
1647+ // assert is to ensure that if it is ever used for something else in
1648+ // the future that you must ensure that it is a proxy-able tool, or if
1649+ // not then you need to use `maybe_get_tool` instead.
1650+ assert ! ( matches!( tool, "rustc" | "rustdoc" ) ) ;
16461651 self . maybe_get_tool ( tool, from_config)
16471652 . or_else ( || {
16481653 // This is an optimization to circumvent the rustup proxies
You can’t perform that action at this time.
0 commit comments