Skip to content

doc_auto_cfg assigns wrong feature to cyclically reexported impl #143318

Open
@alexveecle

Description

@alexveecle

Code

Reproducer in https://github.com/alexveecle/cyclic_doc_auto_cfg

Reproduction Steps

Run cargo doc --all-features and review target/doc/facade/facade_main/foo/struct.Foo.html.

Expected Outcome

The foo function should not be associated to the supporting feature.

Actual Output

Screenshot of the HTML showing the association to the supporting feature.

Version

rustdoc 1.90.0-nightly (28f1c8079 2025-06-24)

Additional Details

We found this issue with a facade crate that reexports other crate modules. The supporting crate also reexports parts of the main crate, which seems to cause this issue.

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)]`T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions