-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
The styling of where-clauses on tuple & unit structs and on assoc tys weirdly differs from those on other items (structs, enums, unions, functions, impl blocks etc.) in that they don't have a smaller fonts size and are indented by 9 instead of 4 spaces (more precisely: for associated types it's 3 instead of 4 inside the .item-decl
of the trait but 9 instead of 4 everywhere else).
Tuple Structs
pub struct A<T>(T)
where
T: Copy;
is rendered as
Compare that to
pub struct B<T>
where
T: Copy,
{
x: T,
}
Unit Structs
#![feature(trivial_bounds)]
pub struct S
where
String: Clone;
Associated Types
pub struct S;
pub trait Tr {
type F<T>
where
T: Clone;
}
impl Tr for S {
type F<T> = T where T: Clone;
}
Inside the .item-decl
of the trait (3 spaces, big):
In section Required Associated Types on the page of the trait (9 spaces):
On the implementer's page (9 spaces, big):
@rustbot label C-bug T-rustdoc A-rustdoc-ui
Metadata
Metadata
Assignees
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.