Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jan 17, 2026

Supersedes #151237.
Follow-up of #151120.

The span overlapping approach wasn't good enough so instead we now check if the reexport itself has the deprecated attribute, and if so, we resolve the path to the reexport DefId, otherwise we resolve it on the reexported item's DefId.

cc @Zalathar
r? @lolbinarycat

@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. labels Jan 17, 2026
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the fix-rustdoc-ice-reexported-deprecated-note branch from 1fcf0c7 to 1faaa76 Compare January 17, 2026 16:16
@GuillaumeGomez
Copy link
Member Author

And fixed fmt...

@lolbinarycat
Copy link
Contributor

@bors r+

I don't see what would've caused an ICE in the last one except maybe the expect_def_id, in which case it's probably better to raise an error than use some fallback likely to cause improper resolution? This approach does look much more robust, though.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 19, 2026

📌 Commit 1faaa76 has been approved by lolbinarycat

It is now in the queue for this repository.

@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 Jan 19, 2026
@GuillaumeGomez
Copy link
Member Author

@bors r+

I don't see what would've caused an ICE in the last one except maybe the expect_def_id, in which case it's probably better to raise an error than use some fallback likely to cause improper resolution? This approach does look much more robust, though.

The span of the item doesn't always contain the attribute (guess how I found out =D). So we tried to resolve the intra-doc link in the wrong scope, which ended very badly.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants