document all arches when part of std #367
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
doc_cfg
feature to coresimd and stdsimd to tell rustdoc about which arch is required for each module. It also uses the#[cfg(dox)]
configuration flag that the rest of libstd uses to ensure that all four major arch modules are included when rustdoc builds the library. This worked great for coresimd, which now proudly shows all the arch intrinsics. However, when trying to re-export these modules in stdsimd, the cfg(dox) trick doesn't work any more, so instead we mask out these modules and link to libcore. Rather than show the full docs for whatever the native arch of the build environment was, i masked out all of them and stubbed them out.For a preview, i have a rendering on my server. Here's what the modules listing looks like in
std::arch
when this branch is used as part of the std docs: