Skip to content

Commit 06bb281

Browse files
hlopkocopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 732860804
1 parent f6495ff commit 06bb281

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rust/bazel/aspects.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ load("//bazel/common:proto_common.bzl", "proto_common")
1212
load("//bazel/common:proto_info.bzl", "ProtoInfo")
1313
load("//bazel/private:cc_proto_aspect.bzl", "cc_proto_aspect")
1414

15-
visibility(["//rust/..."])
15+
visibility(["//rust/...", "//third_party/crubit/rs_bindings_from_cc/..."])
1616

1717
CrateMappingInfo = provider(
1818
doc = "Struct mapping crate name to the .proto import paths",
@@ -298,6 +298,9 @@ def _rust_proto_aspect_common(target, ctx, is_upb):
298298
if RustProtoInfo in target:
299299
return []
300300

301+
if ProtoInfo not in target:
302+
return []
303+
301304
proto_srcs = target[ProtoInfo].direct_sources
302305
proto_deps = getattr(ctx.rule.attr, "deps", [])
303306
transitive_crate_mappings = []

0 commit comments

Comments
 (0)