about summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-06-11 09:37:40 -0700
committerMichael Howell <michael@notriddle.com>2022-06-11 09:54:23 -0700
commitc1487550ca75c2bcd4cb4da038ef1d18d86a857a (patch)
tree91709b5942e2e7f2818be4a27c43850e02c518af /src/librustdoc/html/format.rs
parent3fd16648fe7c7373965d9a14bc8c832589518361 (diff)
downloadrust-c1487550ca75c2bcd4cb4da038ef1d18d86a857a.tar.gz
rust-c1487550ca75c2bcd4cb4da038ef1d18d86a857a.zip
Add test case for #trait-implementations-1 link
Diffstat (limited to 'src/librustdoc/html/format.rs')
-rw-r--r--src/librustdoc/html/format.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 69bd0744a10..c714549d0f5 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -1077,6 +1077,8 @@ impl clean::Impl {
             if let clean::Type::Tuple(types) = &self.for_ &&
                 let [clean::Type::Generic(name)] = &types[..] &&
                 (self.kind.is_tuple_variadic() || self.kind.is_auto()) {
+                // Hardcoded anchor library/core/src/primitive_docs.rs
+                // Link should match `# Trait implementations`
                 primitive_link_fragment(f, PrimitiveType::Tuple, &format!("({name}, ...)"), "#trait-implementations-1", cx)?;
             } else if let Some(ty) = self.kind.as_blanket_ty() {
                 fmt_type(ty, f, use_absolute, cx)?;