blob: fdc92ed42b3c96c6ed0c4436636d72d14b6df227 [file] [log] [blame]
load("@rules_rust//rust:defs.bzl", "rust_test")
# generate a file containing cfg flags
genrule(
name = "flag_generator",
outs = ["generated_flag.data"],
cmd = "echo --cfg=test_flag > $@",
)
rust_test(
name = "test",
srcs = [
"main.rs",
],
data = [":flag_generator"],
edition = "2018",
rustc_flags = [
"@$(location :flag_generator)",
],
)