-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Move rustdoc::clean::utils::find_nearest_parent_module
to TyCtxt
#80740
Conversation
`find_nearest_parent_module` was extracted from `rustdoc::passes::collect_intra_doc_links` in rust-lang#80368. We (me and Joshua Nelson) thought at the time that it should be in rustc instead, and Joshua suggested it be a method on `TyCtxt`. However, since rust-lang#80368 was fixing a significant regression that was about to land on beta, we agreed that to be able to fix this quickly I should leave the code in rustdoc. This is a followup PR to move it to `TyCtxt`.
Some changes occurred in intra-doc-links. cc @jyn514 |
(rust-highfive has picked a reviewer for you, use r? to override) |
I think ecstatic-morse is no longer a reviewer? r? @petrochenkov (re-assign if you want someone else to review) |
Note that there's a somewhat similar method in |
Probably someone on T-rustdoc should review the rustdoc changes. |
I would prefer not to have the unrelated doc changes here, but I don't feel strongly about it. |
9ce1d36
to
859a707
Compare
I moved that commit to a new PR: #80744 |
In general it's assumed that compiler APIs may panic on fake IDs.
This functionality is very specific and is not used outside of rustdoc, so it would be better to keep it in rustdoc, rustc_middle is already too large. |
rustdoc: Turn `next_def_id` comments into docs Split out from rust-lang#80740. r? `@jyn514`
rustdoc: Turn `next_def_id` comments into docs Split out from rust-lang#80740. r? ``@jyn514``
find_nearest_parent_module
was extracted fromrustdoc::passes::collect_intra_doc_links
in #80368.We (me and Joshua Nelson) thought at the time that it should be in rustc
instead, and Joshua suggested it be a method on
TyCtxt
.However, since #80368 was fixing a significant regression that was about
to land on beta, we agreed that to be able to fix this quickly I should
leave the code in rustdoc.
This is a followup PR to move it to
TyCtxt
.cc @jyn514