Skip to content

Conditional features should be made clear in generated docs #62188

Closed
@jdm

Description

@jdm

I spent a bunch of time looking at https://docs.rs/winapi/0.3.7/x86_64-pc-windows-msvc/winapi/um/fileapi/struct.BY_HANDLE_FILE_INFORMATION.html, seeing that there was a Default implementation for the type, and then hitting errors when trying to call BY_HANDLE_FILE_INFORMATION::default() in code that was using winapi 0.3.7. Eventually I clicked on https://docs.rs/winapi/0.3.7/x86_64-pc-windows-msvc/src/winapi/macros.rs.html#381 and realized that the implementation is only generated if the impl-default feature is enabled. I think it would be very helpful to expose information about conditional compilation in the generated documentation somehow in order to avoid problems like this in the future.

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