Skip to content

[rustdoc] Correctly handle rustc_allow_incoherent_impl on primitive methods - #163360

Open
GuillaumeGomez wants to merge 1 commit into
rust-lang:mainfrom
GuillaumeGomez:primitive-incoherent-methods
Open

GuillaumeGomez wants to merge 1 commit into
rust-lang:mainfrom
GuillaumeGomez:primitive-incoherent-methods

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Needed for #162808.
First commit comes from #163133.

This is more of a hack than a proper fix as I don't think there is a better way to handle this. So in short:

  • If a primitive incoherent impl method is implemented outside of core/alloc/std, we don't link to it.
  • If in alloc/std, we link to std

r? @Urgau

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Sep 25, 2026
@rust-bors

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomez force-pushed the primitive-incoherent-methods branch from 4982ff0 to 456accc Compare September 26, 2026 16:12
@rustbot

rustbot commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Urgau

Urgau commented Sep 27, 2026

Copy link
Copy Markdown
Member

Did you try using the same trick previous the previous PR by using transitive_reexport_path? or does that also leads to the wrong path?

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

It leads to alloc, which doesn't have primitive pages. Hence the big ugly hack. :')

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants