From 20010d759718ade4ae33a173539ff808854ac269 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 5 May 2022 17:20:14 -0700 Subject: rustdoc: ensure HTML/JS side implementors don't have dups --- src/librustdoc/html/render/write_shared.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/librustdoc/html/render/write_shared.rs') diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 7c202e471ad..e8e5fa17993 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -501,10 +501,13 @@ pub(super) fn write_shared( // // FIXME: this is a vague explanation for why this can't be a `get`, in // theory it should be... - let &(ref remote_path, remote_item_type) = match cache.paths.get(&did) { - Some(p) => p, + let (remote_path, remote_item_type) = match cache.exact_paths.get(&did) { + Some(p) => match cache.paths.get(&did).or_else(|| cache.external_paths.get(&did)) { + Some((_, t)) => (p, t), + None => continue, + }, None => match cache.external_paths.get(&did) { - Some(p) => p, + Some((p, t)) => (p, t), None => continue, }, }; -- cgit 1.4.1-3-g733a5