Skip to content

rustdoc: Fix crash when trying to inline foreign item which cannot have attributes#158751

Open
GuillaumeGomez wants to merge 1 commit into
rust-lang:mainfrom
GuillaumeGomez:fix-foreign-inlining
Open

rustdoc: Fix crash when trying to inline foreign item which cannot have attributes#158751
GuillaumeGomez wants to merge 1 commit into
rust-lang:mainfrom
GuillaumeGomez:fix-foreign-inlining

Conversation

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez commented Jul 3, 2026

Copy link
Copy Markdown
Member

Fixes #158686.

Problem was that there was no filtering made on the reexport_chain items before we tried to query its attributes. And if it's an item which cannot have attributes, it crashed.

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 Jul 3, 2026
Comment thread src/librustdoc/clean/inline.rs
Comment thread src/librustdoc/clean/inline.rs
Comment thread src/librustdoc/clean/inline.rs

@Urgau Urgau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Urgau

Urgau commented Jul 4, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d6f62f6 has been approved by Urgau

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 5, 2026
…g, r=Urgau

rustdoc: Fix crash when trying to inline foreign item which cannot have attributes

Fixes rust-lang#158686.

Problem was that there was no filtering made on the `reexport_chain` items before we tried to query its attributes. And if it's an item which cannot have attributes, it crashed.

r? @Urgau
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 5, 2026
…g, r=Urgau

rustdoc: Fix crash when trying to inline foreign item which cannot have attributes

Fixes rust-lang#158686.

Problem was that there was no filtering made on the `reexport_chain` items before we tried to query its attributes. And if it's an item which cannot have attributes, it crashed.

r? @Urgau
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 5, 2026
…g, r=Urgau

rustdoc: Fix crash when trying to inline foreign item which cannot have attributes

Fixes rust-lang#158686.

Problem was that there was no filtering made on the `reexport_chain` items before we tried to query its attributes. And if it's an item which cannot have attributes, it crashed.

r? @Urgau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

[ICE]: rustdoc panics when a crate glob-imports another crate that has a pub extern crate

3 participants