Skip to content

rustdoc doc_auto_cfg incorrectly picks up cfg's #90497

Open
@Mark-Simulacrum

Description

@Mark-Simulacrum

NOTE(camelid): This bug is now feature-gated behind the doc_auto_cfg flag and, as such, is no longer a regression. The original issue text follows.


For example, https://doc.rust-lang.org/nightly/std/primitive.usize.html#method.trailing_zeros has a tag indicating it is only supported on 64-bit, but in practice the method is defined on 32-bit as well; it's just defined separately from that definition.

This seems like it'll probably hurt particularly new users who may be annoyed at the lack of cross-target compatibility in such a method -- if we can't design a fix, I'd prefer that we disable the autosetting of cfgs for now, since it seems like this is likely to be widespread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-doc_auto_cfg`#![feature(doc_auto_cfg)]`F-doc_cfg`#![feature(doc_cfg)]`P-mediumMedium priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions