Skip to content

Commit

Permalink
Rollup merge of rust-lang#118321 - WaffleLapkin:unspace-fn-pointer-fa…
Browse files Browse the repository at this point in the history
…ke-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 rust-lang#98180 (or rather, added the feature with a space included).
  • Loading branch information
GuillaumeGomez authored Nov 26, 2023
2 parents 3bb0171 + 1a3c5c4 commit 5e4ca82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/core/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ impl clean::Impl {
primitive_link_fragment(
f,
PrimitiveType::Tuple,
format_args!("fn ({name}₁, {name}₂, …, {name}ₙ{ellipsis})"),
format_args!("fn({name}₁, {name}₂, …, {name}ₙ{ellipsis})"),
"#trait-implementations-1",
cx,
)?;
Expand Down

0 comments on commit 5e4ca82

Please sign in to comment.