Skip to content

Commit cfb9af9

Browse files
authored
Support crate_features in rust_doc() and rust_doc_test() (#3544)
These attributes are already handled by construct_arguments() in rustdoc_compile_action(), this just tells Bazel that they are valid parameters in the top-level rules.
1 parent 878e947 commit cfb9af9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

rust/private/rustdoc.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ rust_doc = rule(
321321
providers = [rust_common.crate_info],
322322
mandatory = True,
323323
),
324+
"crate_features": attr.string_list(
325+
doc = dedent("""\
326+
List of features to enable for the crate being documented.
327+
"""),
328+
),
324329
"html_after_content": attr.label(
325330
doc = "File to add in `<body>`, after content.",
326331
allow_single_file = [".html", ".md"],

rust/private/rustdoc_test.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ rust_doc_test = rule(
202202
providers = [rust_common.crate_info],
203203
mandatory = True,
204204
),
205+
"crate_features": attr.string_list(
206+
doc = dedent("""\
207+
List of features to enable for the crate being documented.
208+
"""),
209+
),
205210
"deps": attr.label_list(
206211
doc = dedent("""\
207212
List of other libraries to be linked to this library target.

0 commit comments

Comments
 (0)