Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve documentation for optional features #203

Merged
merged 1 commit into from Sep 5, 2023

Conversation

joseluis
Copy link
Contributor

I realized the documentation in docs.rs could benefit by explicitly indicating the items and implementations that depends on which specific features. Please let me know if you want anything done differently. This is the summary of the changes so far:

  • new feature nightly_docs enables doc_cfg unstable feature that allows showing explicit dependencies on features.
  • new cargo alias nightly_docs for a more convenient local documentation build. E.g.: cargo +nightly nightly_docs --open.
  • annotate exported items and implementations depending on some feature with the corresponding doc(cfg()) attribute.
  • add the nightly_docs feature to the [package.metadata.docs.rs] section.

- new feature `nightly_docs` enables `doc_cfg` unstable feature that allows showing explicit dependencies on features.
- new cargo alias `nightly_docs` for a more convenient local documentation build `cargo +nightly nightly_docs --open`.
- annotate exported items and implementations depending on some feature with the corresponding `doc(cfg())` attribute.
- add the `nightly_docs` feature to the `[package.metadata.docs.rs]` section.
@zachs18
Copy link
Contributor

zachs18 commented Aug 14, 2023

I made a commit expanding the impl_unsafe_marker_for_simd macro to handle this gracefully, if you would like to include it here.

@Lokathor
Copy link
Owner

Lokathor commented Sep 5, 2023

I'm going to just accept this as-is, @zachs18 feel free to do a follow-up PR if you want

@Lokathor Lokathor merged commit f047fb6 into Lokathor:main Sep 5, 2023
14 checks passed
@Lokathor Lokathor added the semver-patch semver patch change label Sep 5, 2023
@joseluis joseluis deleted the nightly_docs branch September 5, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch semver patch change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants