1
Fork 0

Auto merge of #127658 - compiler-errors:precise-capturing-rustdoc-cross, r=fmease

Add cross-crate precise capturing support to rustdoc

Follow-up to #127632. Fixes #127228.

r? `@fmease`

Tracking:
* https://github.com/rust-lang/rust/issues/123432
This commit is contained in:
bors 2024-07-20 11:03:35 +00:00
commit 73a228116a
8 changed files with 87 additions and 17 deletions

View file

@ -1261,6 +1261,7 @@ rustc_queries! {
desc { |tcx| "looking up function parameter names for `{}`", tcx.def_path_str(def_id) }
separate_provide_extern
}
/// Gets the rendered value of the specified constant or associated constant.
/// Used by rustdoc.
query rendered_const(def_id: DefId) -> &'tcx String {
@ -1268,6 +1269,13 @@ rustc_queries! {
desc { |tcx| "rendering constant initializer of `{}`", tcx.def_path_str(def_id) }
separate_provide_extern
}
/// Gets the rendered precise capturing args for an opaque for use in rustdoc.
query rendered_precise_capturing_args(def_id: DefId) -> Option<&'tcx [Symbol]> {
desc { |tcx| "rendering precise capturing args for `{}`", tcx.def_path_str(def_id) }
separate_provide_extern
}
query impl_parent(def_id: DefId) -> Option<DefId> {
desc { |tcx| "computing specialization parent impl of `{}`", tcx.def_path_str(def_id) }
separate_provide_extern