diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d324fd73f..a3c1c9108 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -154,7 +154,7 @@ required for various parts of Tokio are missing. To build the documentation correctly, use this command: ``` -RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features +RUSTDOCFLAGS="--cfg docsrs" RUSTFLAGS="--cfg docsrs" cargo +nightly doc --all-features ``` To build documentation including Tokio's unstable features, it is necessary to @@ -162,15 +162,9 @@ pass `--cfg tokio_unstable` to both RustDoc *and* rustc. To build the documentation for unstable features, use this command: ``` -RUSTDOCFLAGS="--cfg docsrs --cfg tokio_unstable" RUSTFLAGS="--cfg tokio_unstable" cargo +nightly doc --all-features +RUSTDOCFLAGS="--cfg docsrs --cfg tokio_unstable" RUSTFLAGS="--cfg docsrs --cfg tokio_unstable" 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 command below instead: