Skip to content

Commit a75e629

Browse files
committed
only remove link for TyMethod
1 parent 441a350 commit a75e629

File tree

1 file changed

+4
-4
lines changed
  • src/librustdoc/html/render

1 file changed

+4
-4
lines changed

src/librustdoc/html/render/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -867,10 +867,10 @@ fn render_assoc_item(
867867
ItemType::TyMethod
868868
};
869869

870-
match href(did.expect_def_id(), cx) {
871-
Ok(p) => Some(format!("{}#{}.{}", p.0, ty, name)),
872-
Err(HrefError::DocumentationNotBuilt) => None,
873-
Err(_) => Some(format!("#{}.{}", ty, name)),
870+
match (href(did.expect_def_id(), cx), ty) {
871+
(Ok(p), ty) => Some(format!("{}#{}.{}", p.0, ty, name)),
872+
(Err(HrefError::DocumentationNotBuilt), ItemType::TyMethod) => None,
873+
(Err(_), ty) => Some(format!("#{}.{}", ty, name)),
874874
}
875875
}
876876
};

0 commit comments

Comments
 (0)