From a75e6292c52673df2aa090f16873e162028a39d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Mockers?= Date: Tue, 6 Jul 2021 20:19:54 +0200 Subject: [PATCH] only remove link for TyMethod --- src/librustdoc/html/render/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index e6a10c47497..a7016075407 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -867,10 +867,10 @@ fn method( ItemType::TyMethod }; - match href(did.expect_def_id(), cx) { - Ok(p) => Some(format!("{}#{}.{}", p.0, ty, name)), - Err(HrefError::DocumentationNotBuilt) => None, - Err(_) => Some(format!("#{}.{}", ty, name)), + match (href(did.expect_def_id(), cx), ty) { + (Ok(p), ty) => Some(format!("{}#{}.{}", p.0, ty, name)), + (Err(HrefError::DocumentationNotBuilt), ItemType::TyMethod) => None, + (Err(_), ty) => Some(format!("#{}.{}", ty, name)), } } }; -- 2.44.0