mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
chore: mention fix for building docs in contributing guide (#3618)
I ran into this when writing the docs for `Handle::block_on`. Seems to be caused by a bug in cargo. Until that is fixed I think it makes sense to mention it in the contributing guide.
This commit is contained in:
parent
f107c4f49b
commit
cc90a5c679
@ -124,17 +124,27 @@ arguments to many common cargo commands. This section lists some commonly needed
|
|||||||
commands.
|
commands.
|
||||||
|
|
||||||
Some commands just need the `--all-features` argument:
|
Some commands just need the `--all-features` argument:
|
||||||
|
|
||||||
```
|
```
|
||||||
cargo build --all-features
|
cargo build --all-features
|
||||||
cargo check --all-features
|
cargo check --all-features
|
||||||
cargo test --all-features
|
cargo test --all-features
|
||||||
```
|
```
|
||||||
|
|
||||||
When building documentation normally, the markers that list the features
|
When building documentation normally, the markers that list the features
|
||||||
required for various parts of Tokio are missing. To build the documentation
|
required for various parts of Tokio are missing. To build the documentation
|
||||||
correctly, use this command:
|
correctly, use this command:
|
||||||
|
|
||||||
```
|
```
|
||||||
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
|
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
|
||||||
```
|
```
|
||||||
|
|
||||||
|
There is currently a [bug in cargo] that means documentation cannot be built
|
||||||
|
from the root of the workspace. If you `cd` into the `tokio` subdirectory the
|
||||||
|
command shown above will work.
|
||||||
|
|
||||||
|
[bug in cargo]: https://github.com/rust-lang/cargo/issues/9274
|
||||||
|
|
||||||
The `cargo fmt` command does not work on the Tokio codebase. You can use the
|
The `cargo fmt` command does not work on the Tokio codebase. You can use the
|
||||||
command below instead:
|
command below instead:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user