Skip to content

Commit

Permalink
only remove link for TyMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Jul 6, 2021
1 parent 441a350 commit a75e629
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,10 +867,10 @@ fn render_assoc_item(
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)),
}
}
};
Expand Down

0 comments on commit a75e629

Please sign in to comment.