summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-14 19:26:19 +0100
committerGitHub <noreply@github.com>2022-11-14 19:26:19 +0100
commitdc869fcfb22bfabae187578dcd10ba68348fdc93 (patch)
tree7be9784abf0aadd285b357d7d33189e473600486 /compiler/rustc_resolve/src
parent050ece6765bbbe068d5e456ad6e55c0806e63720 (diff)
parent8e81cc262e08e4c93df3ac9c1a3814372e4908c8 (diff)
downloadrust-dc869fcfb22bfabae187578dcd10ba68348fdc93.tar.gz
rust-dc869fcfb22bfabae187578dcd10ba68348fdc93.zip
Rollup merge of #104364 - petrochenkov:docice2, r=GuillaumeGomez
rustdoc: Resolve doc links in external traits having local impls

For external impls it was done in https://github.com/rust-lang/rust/pull/103192 right away, but the local impl case was forgotten.

Fixes https://github.com/rust-lang/rust/issues/104145.
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs
index a1ff477c6fe..9ca3588fff4 100644
--- a/compiler/rustc_resolve/src/lib.rs
+++ b/compiler/rustc_resolve/src/lib.rs
@@ -1932,6 +1932,11 @@ impl<'a> Resolver<'a> {
         }
     }
 
+    /// For rustdoc.
+    pub fn get_partial_res(&self, node_id: NodeId) -> Option<PartialRes> {
+        self.partial_res_map.get(&node_id).copied()
+    }
+
     /// Retrieves the span of the given `DefId` if `DefId` is in the local crate.
     #[inline]
     pub fn opt_span(&self, def_id: DefId) -> Option<Span> {