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 {
1643
1643
/// Looks for a path for `tool` in an environment variable or config path, defaulting to `tool`
1644
1644
/// as a path.
1645
1645
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" ) ) ;
1646
1651
self . maybe_get_tool ( tool, from_config)
1647
1652
. or_else ( || {
1648
1653
// This is an optimization to circumvent the rustup proxies
You can’t perform that action at this time.
0 commit comments