diff --git a/cargo/private/cargo_build_script.bzl b/cargo/private/cargo_build_script.bzl index b017f3318e..4609b5bc6c 100644 --- a/cargo/private/cargo_build_script.bzl +++ b/cargo/private/cargo_build_script.bzl @@ -256,6 +256,7 @@ def _cargo_build_script_impl(ctx): mnemonic = "CargoBuildScriptRun", progress_message = "Running Cargo build script {}".format(pkg_name), env = env, + toolchain = None, ) return [ diff --git a/rust/private/clippy.bzl b/rust/private/clippy.bzl index 071ca29c20..0f1f35ab82 100644 --- a/rust/private/clippy.bzl +++ b/rust/private/clippy.bzl @@ -178,6 +178,7 @@ See https://github.com/bazelbuild/rules_rust/pull/1264#discussion_r853241339 for tools = [toolchain.clippy_driver], arguments = args.all, mnemonic = "Clippy", + toolchain = "@rules_rust//rust:toolchain_type", ) return [ diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl index e76c20bde0..501e1403d2 100644 --- a/rust/private/rustc.bzl +++ b/rust/private/rustc.bzl @@ -1268,6 +1268,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), + toolchain = "@rules_rust//rust:toolchain_type", ) if args_metadata: ctx.actions.run( @@ -1283,6 +1284,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), + toolchain = "@rules_rust//rust:toolchain_type", ) else: # Run without process_wrapper @@ -1301,6 +1303,7 @@ def rustc_compile_action( formatted_version, len(crate_info.srcs.to_list()), ), + toolchain = "@rules_rust//rust:toolchain_type", ) if experimental_use_cc_common_link: