diff --git a/rust/private/rust.bzl b/rust/private/rust.bzl index 2914f4cc3d..450da0dc22 100644 --- a/rust/private/rust.bzl +++ b/rust/private/rust.bzl @@ -295,9 +295,8 @@ def _rust_test_impl(ctx): compile_data_targets = depset(ctx.attr.compile_data) rustc_env_files = ctx.files.rustc_env_files + crate.rustc_env_files - rustc_env = dict(crate._rustc_env_attr) - # crate.rustc_env is already expanded upstream in rust_library rule implementation + rustc_env = dict(crate.rustc_env) data_paths = depset(direct = getattr(ctx.attr, "data", [])).to_list() rustc_env.update(expand_dict_value_locations( ctx, @@ -317,7 +316,6 @@ def _rust_test_impl(ctx): output = output, edition = crate.edition, rustc_env = rustc_env, - _rustc_env_attr = ctx.attr.rustc_env, rustc_env_files = rustc_env_files, is_test = True, compile_data = compile_data, @@ -361,7 +359,6 @@ def _rust_test_impl(ctx): output = output, edition = get_edition(ctx.attr, toolchain, ctx.label), rustc_env = rustc_env, - _rustc_env_attr = ctx.attr.rustc_env, rustc_env_files = ctx.files.rustc_env_files, is_test = True, compile_data = depset(ctx.files.compile_data),