Conditional features should be made clear in generated docs #62188
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.
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.
The text was updated successfully, but these errors were encountered: