mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-06 12:04:36 +00:00
rustdoc: change "variadic tuple" notation to look less like real syntax
This commit is contained in:
parent
94396711dd
commit
2bbf44f655
@ -918,10 +918,10 @@ mod prim_str {}
|
||||
// linked to as `#trait-implementations-1`
|
||||
/// # Trait implementations
|
||||
///
|
||||
/// In this documentation the shorthand `(T, ...)` is used to represent tuples of varying length.
|
||||
/// When that is used, any trait bound expressed on `T` applies to each element of the tuple
|
||||
/// independently. Note that this is a convenience notation to avoid repetitive documentation,
|
||||
/// not valid Rust syntax.
|
||||
/// In this documentation the shorthand `(T₁, T₂, …, Tₙ)` is used to represent tuples of varying
|
||||
/// length. When that is used, any trait bound expressed on `T` applies to each element of the
|
||||
/// tuple independently. Note that this is a convenience notation to avoid repetitive
|
||||
/// documentation, not valid Rust syntax.
|
||||
///
|
||||
/// Due to a temporary restriction in Rust’s type system, the following traits are only
|
||||
/// implemented on tuples of arity 12 or less. In the future, this may change:
|
||||
|
@ -918,10 +918,10 @@ mod prim_str {}
|
||||
// linked to as `#trait-implementations-1`
|
||||
/// # Trait implementations
|
||||
///
|
||||
/// In this documentation the shorthand `(T, ...)` is used to represent tuples of varying length.
|
||||
/// When that is used, any trait bound expressed on `T` applies to each element of the tuple
|
||||
/// independently. Note that this is a convenience notation to avoid repetitive documentation,
|
||||
/// not valid Rust syntax.
|
||||
/// In this documentation the shorthand `(T₁, T₂, …, Tₙ)` is used to represent tuples of varying
|
||||
/// length. When that is used, any trait bound expressed on `T` applies to each element of the
|
||||
/// tuple independently. Note that this is a convenience notation to avoid repetitive
|
||||
/// documentation, not valid Rust syntax.
|
||||
///
|
||||
/// Due to a temporary restriction in Rust’s type system, the following traits are only
|
||||
/// implemented on tuples of arity 12 or less. In the future, this may change:
|
||||
|
@ -1079,7 +1079,7 @@ impl clean::Impl {
|
||||
(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)?;
|
||||
primitive_link_fragment(f, PrimitiveType::Tuple, &format!("({name}₁, {name}₂, …, {name}ₙ)"), "#trait-implementations-1", cx)?;
|
||||
} else if let Some(ty) = self.kind.as_blanket_ty() {
|
||||
fmt_type(ty, f, use_absolute, cx)?;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user