Conversation
| /// | ||
| /// [`TryCryptoRng`]: crate::TryCryptoRng | ||
| /// [`TryRngCore`]: crate::TryRngCore | ||
| /// [`CryptoRng`]: crate::CryptoRng |
There was a problem hiding this comment.
I've also fixed these doc item links. We probably should setup a CI job to check doc links in a separate PR.
There was a problem hiding this comment.
We do have an existing check-doc job, which should also detect bad in-repo links. Possibly we also need to deny warnings?
| )] | ||
| #[cfg_attr( | ||
| feature = "serde1 ", | ||
| feature = "serde1", |
There was a problem hiding this comment.
This is a typo caught by the unexpected_cfgs lint.
|
|
||
| [package.metadata.docs.rs] | ||
| rustdoc-args = ["--generate-link-to-definition"] | ||
| rustdoc-args = ["--cfg docsrs", "--generate-link-to-definition"] |
There was a problem hiding this comment.
Configuration option previously was not enabled for rand_distr.
Cargo.toml
Outdated
| # RUSTDOCFLAGS="--cfg docsrs -Zunstable-options --generate-link-to-definition" cargo +nightly doc --all --all-features --no-deps --open | ||
| all-features = true | ||
| rustdoc-args = ["--cfg", "doc_cfg", "-Zunstable-options", "--generate-link-to-definition"] | ||
| rustdoc-args = ["--cfg", "docsrs", "-Zunstable-options", "--generate-link-to-definition"] |
There was a problem hiding this comment.
Do we still need -Zunstable-options?
There was a problem hiding this comment.
IIRC it was there for --generate-link-to-definition
There was a problem hiding this comment.
We then should add it to rand_core and rand_distr as well. Although, I am not sure if this feature even works right now. The link in #1327 does not contain any links to definitions anymore.
UPD: Ah, according to this comment this flag is no longer needed. I've generated rand docs locally and source links were properly generated.
Renaming the configuration option also allows to enable back the
unexpected_cfgslint.I've checked generated docs and it does not look like using
doc_auto_cfginstead of explicitdoc_cfgs causes any issues. The check was by no means exhaustive, but most cases look perfectly good.