Skip to content

Commit

Permalink
Add --generate-link-to-definition option when building on docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 15, 2023
1 parent ee80b41 commit 8042ccb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]

[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --generate-link-to-definition --open
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]
rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]

[package.metadata.playground]
features = ["small_rng", "serde1"]
Expand Down
3 changes: 3 additions & 0 deletions rand_chacha/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ categories = ["algorithms", "no-std"]
edition = "2021"
rust-version = "1.56"

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]

[dependencies]
rand_core = { path = "../rand_core", version = "0.7.0" }
ppv-lite86 = { version = "0.2.14", default-features = false, features = ["simd"] }
Expand Down
2 changes: 1 addition & 1 deletion rand_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rust-version = "1.56"
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]
rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]

[package.metadata.playground]
all-features = true
Expand Down
3 changes: 3 additions & 0 deletions rand_distr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ edition = "2021"
rust-version = "1.56"
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]

[features]
default = ["std"]
std = ["alloc", "rand/std"]
Expand Down
3 changes: 3 additions & 0 deletions rand_pcg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ categories = ["algorithms", "no-std"]
edition = "2021"
rust-version = "1.56"

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]

[features]
serde1 = ["serde"]

Expand Down

0 comments on commit 8042ccb

Please sign in to comment.