Skip to content

Commit

Permalink
Remove _rustc_env_attr in rust_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinh Tran committed Oct 9, 2023
1 parent fd22f5a commit a7c5e12
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit a7c5e12

Please sign in to comment.