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

Rustdoc doesn't seem to know about target_feature #46317

Closed
hdevalence opened this issue Nov 27, 2017 · 2 comments
Closed

Rustdoc doesn't seem to know about target_feature #46317

hdevalence opened this issue Nov 27, 2017 · 2 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@hdevalence
Copy link

I have a module declared as:

#[cfg(all(target_feature="avx2", feature="...", ...))]
pub mod avx2;

where ... are various conditions. Removing the target_feature condition results in rustdoc documenting the module when the other conditions are met, but I can't get rustdoc to document the module when the target_feature condition is there. I'm passing the feature to cargo as

RUSTFLAGS="-C target_feature=+avx2" cargo rustdoc --features "..." -- ...

Since the documentation appears exactly when the target_feature condition is missing, I suspect that Rustdoc doesn't know about target_feature?

@hanna-kruppe
Copy link
Contributor

cc #46189

@TimNN TimNN added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Nov 28, 2017
@QuietMisdreavus
Copy link
Member

Rustdoc gained the -C/--codegen flag in #49956, though you'll need to pass it via RUSTDOCFLAGS or at the end of that cargo rustdoc invocation for it to apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants