Skip to content

Rustdoc doesn't seem to know about target_feature #46317

Closed
@hdevalence

Description

@hdevalence

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions