Auto merge of #118321 - WaffleLapkin:unspace-fn-pointer-fake-variadic, r=notriddle

rustdoc: Remove space from fake-variadic fn ptr impls

before: `for fn (T₁, T₂, …, Tₙ) -> Ret`
after: `for fn(T₁, T₂, …, Tₙ) -> Ret`

I don't think we usually have spaces there, so it looks weird.

cc `@notriddle` since you added the space in https://github.com/rust-lang/rust/pull/98180 (or rather, added the feature with a space included).
This commit is contained in:
bors 2023-11-27 06:16:15 +00:00
commit a19161043a
2 changed files with 2 additions and 2 deletions

View File

@ -1629,7 +1629,7 @@ mod prim_ref {}
/// ///
/// ### Trait implementations /// ### 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 /// function pointers of varying length. Note that this is a convenience notation to avoid
/// repetitive documentation, not valid Rust syntax. /// repetitive documentation, not valid Rust syntax.
/// ///

View File

@ -1305,7 +1305,7 @@ pub(crate) fn print<'a, 'tcx: 'a>(
primitive_link_fragment( primitive_link_fragment(
f, f,
PrimitiveType::Tuple, PrimitiveType::Tuple,
format_args!("fn ({name}₁, {name}₂, …, {name}{ellipsis})"), format_args!("fn({name}₁, {name}₂, …, {name}{ellipsis})"),
"#trait-implementations-1", "#trait-implementations-1",
cx, cx,
)?; )?;