diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index a7e20407cec..e5d7e964381 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -1629,7 +1629,7 @@ mod prim_ref {} /// /// ### Trait implementations /// -/// In this documentation the shorthand `fn (T₁, T₂, …, Tₙ)` is used to represent non-variadic +/// In this documentation the shorthand `fn(T₁, T₂, …, Tₙ)` is used to represent non-variadic /// function pointers of varying length. Note that this is a convenience notation to avoid /// repetitive documentation, not valid Rust syntax. /// diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 06bfd4652d6..bed8f6ffef5 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -1305,7 +1305,7 @@ pub(crate) fn print<'a, 'tcx: 'a>( primitive_link_fragment( f, PrimitiveType::Tuple, - format_args!("fn ({name}₁, {name}₂, …, {name}ₙ{ellipsis})"), + format_args!("fn({name}₁, {name}₂, …, {name}ₙ{ellipsis})"), "#trait-implementations-1", cx, )?;