blob: cbf1bbe6fa137ed25d041a65cbc42ddda8e1835f [file] [log] [blame]
"""Alias-like rule for testing."""
load("@rules_rust//rust:defs.bzl", "rust_common")
def _custom_alias_impl(ctx):
actual = ctx.attr.actual
return [actual[rust_common.crate_info], actual[rust_common.dep_info]]
custom_alias = rule(
implementation = _custom_alias_impl,
attrs = {
"actual": attr.label(
allow_single_file = True,
mandatory = True,
),
},
)