-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
rustdoc: Fix ICE when deprecated note is not resolved on the correct DefId
#151255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
rustdoc: Fix ICE when deprecated note is not resolved on the correct DefId
#151255
Conversation
This comment has been minimized.
This comment has been minimized.
1fcf0c7 to
1faaa76
Compare
|
And fixed |
|
@bors r+ I don't see what would've caused an ICE in the last one except maybe the |
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. |
…ted-note, r=lolbinarycat rustdoc: Fix ICE when deprecated note is not resolved on the correct `DefId` Supersedes rust-lang#151237. Follow-up of rust-lang#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
…ted-note, r=lolbinarycat rustdoc: Fix ICE when deprecated note is not resolved on the correct `DefId` Supersedes rust-lang#151237. Follow-up of rust-lang#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
Rollup of 8 pull requests Successful merges: - #149587 (coverage: Sort the expansion tree to help choose a single BCB for child expansions) - #150071 (Add dist step for Enzyme) - #150288 (Add scalar support for offload) - #151091 (Add new "hide deprecated items" setting in rustdoc) - #151255 (rustdoc: Fix ICE when deprecated note is not resolved on the correct `DefId`) - #151375 (Fix terminal width dependent tests) - #151384 (add basic `TokenStream` api tests) - #151391 (rustc-dev-guide subtree update) r? @ghost
|
@bors p=10 Just in case the rollup currently being tested fails, as this causes errors in rustc-perf and blocks is CI. |
Supersedes #151237.
Follow-up of #151120.
The
spanoverlapping approach wasn't good enough so instead we now check if the reexport itself has thedeprecatedattribute, and if so, we resolve the path to the reexportDefId, otherwise we resolve it on the reexported item'sDefId.cc @Zalathar
r? @lolbinarycat