Skip to content

Use doc_cfg to improve register_custom_getrandom docs#200

Merged
josephlr merged 3 commits intomasterfrom
doc_feature
Jan 19, 2021
Merged

Use doc_cfg to improve register_custom_getrandom docs#200
josephlr merged 3 commits intomasterfrom
doc_feature

Conversation

@newpavlov
Copy link
Member

The resulting docs will look like this:
1
2

@newpavlov newpavlov requested a review from josephlr January 17, 2021 22:07
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Copy link
Member

@josephlr josephlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that this works by running:

RUSTDOCFLAGS="--cfg docsrs" cargo deadlinks -- --open --features=custom,std

@josephlr
Copy link
Member

@newpavlov I updated the docs tests to set docsrs, and also added a doc(cfg(feature = "std")) to our std trait implementations, this produces the following nice note:

rustdoc

@newpavlov
Copy link
Member Author

Ah, good to know!

@josephlr josephlr merged commit 27b5172 into master Jan 19, 2021
@josephlr josephlr deleted the doc_feature branch January 19, 2021 10:56
takumi-earth pushed a commit to earthlings-dev/getrandom that referenced this pull request Jan 27, 2026
Use doc_cfg to improve register_custom_getrandom docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants