Skip to content

Commit

Permalink
Regenerate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Nov 14, 2021
1 parent b7c2279 commit 142cc88
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 62 deletions.
62 changes: 31 additions & 31 deletions docs/flatten.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,38 +446,38 @@ rust_doc(<a href="#rust_doc-name">name</a>, <a href="#rust_doc-crate">crate</a>,
Generates code documentation.

Example:
Suppose you have the following directory structure for a Rust library crate:
Suppose you have the following directory structure for a Rust library crate:

```
[workspace]/
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
```
```
[workspace]/
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
```

To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib` `rust_library` target:
To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib` `rust_library` target:

[rustdoc]: https://doc.rust-lang.org/book/documentation.html
[rustdoc]: https://doc.rust-lang.org/book/documentation.html

```python
package(default_visibility = ["//visibility:public"])
```python
package(default_visibility = ["//visibility:public"])

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_doc")
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_doc")

rust_library(
name = "hello_lib",
srcs = ["src/lib.rs"],
)
rust_library(
name = "hello_lib",
srcs = ["src/lib.rs"],
)

rust_doc(
name = "hello_lib_doc",
crate = ":hello_lib",
)
```
rust_doc(
name = "hello_lib_doc",
crate = ":hello_lib",
)
```

Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.
Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.


**ATTRIBUTES**
Expand Down Expand Up @@ -510,14 +510,14 @@ Suppose you have the following directory structure for a Rust library crate:

```output
[workspace]/
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
```

To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test` target that depends on the `hello_lib` `rust_library` target:
To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test` target that depends on the `hello_lib` `rust_library` target:

[doc-test]: https://doc.rust-lang.org/book/documentation.html#documentation-as-tests

Expand Down Expand Up @@ -546,7 +546,7 @@ Running `bazel test //hello_lib:hello_lib_doc_test` will run all documentation t
| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="rust_doc_test-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
| <a id="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for.<br><br><code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
| <a id="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for. <code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
| <a id="rust_doc_test-dep"></a>dep | __deprecated__: use <code>crate</code> | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |


Expand Down
62 changes: 31 additions & 31 deletions docs/rust_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@ rust_doc(<a href="#rust_doc-name">name</a>, <a href="#rust_doc-crate">crate</a>,
Generates code documentation.

Example:
Suppose you have the following directory structure for a Rust library crate:
Suppose you have the following directory structure for a Rust library crate:

```
[workspace]/
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
```
```
[workspace]/
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
```

To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib` `rust_library` target:
To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib` `rust_library` target:

[rustdoc]: https://doc.rust-lang.org/book/documentation.html
[rustdoc]: https://doc.rust-lang.org/book/documentation.html

```python
package(default_visibility = ["//visibility:public"])
```python
package(default_visibility = ["//visibility:public"])

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_doc")
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_doc")

rust_library(
name = "hello_lib",
srcs = ["src/lib.rs"],
)
rust_library(
name = "hello_lib",
srcs = ["src/lib.rs"],
)

rust_doc(
name = "hello_lib_doc",
crate = ":hello_lib",
)
```
rust_doc(
name = "hello_lib_doc",
crate = ":hello_lib",
)
```

Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.
Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.


**ATTRIBUTES**
Expand Down Expand Up @@ -79,14 +79,14 @@ Suppose you have the following directory structure for a Rust library crate:

```output
[workspace]/
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
WORKSPACE
hello_lib/
BUILD
src/
lib.rs
```

To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test` target that depends on the `hello_lib` `rust_library` target:
To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test` target that depends on the `hello_lib` `rust_library` target:

[doc-test]: https://doc.rust-lang.org/book/documentation.html#documentation-as-tests

Expand Down Expand Up @@ -115,7 +115,7 @@ Running `bazel test //hello_lib:hello_lib_doc_test` will run all documentation t
| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="rust_doc_test-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
| <a id="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for.<br><br><code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
| <a id="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for. <code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
| <a id="rust_doc_test-dep"></a>dep | __deprecated__: use <code>crate</code> | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |


0 comments on commit 142cc88

Please sign in to comment.