From c1487550ca75c2bcd4cb4da038ef1d18d86a857a Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sat, 11 Jun 2022 09:37:40 -0700 Subject: Add test case for #trait-implementations-1 link --- src/librustdoc/html/format.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/librustdoc') 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)?; -- cgit 1.4.1-3-g733a5