You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PartialOrd docs for generic tuples show the where clauses in a seemingly random order #88809
The docs for PartialOrd on tuples show the where clauses in a weird order, obscuring the fact that the last element of the tuple is allowed to be unsized.
Found the issue: it's because we use a BTreeMap using Symbol as key. Problem being that Symbol is making integer based comparison and not string based, hence the current result. Trying to write a test now.
Note that this bug is specific to cross-crate re-exports; the same documentation in core renders correctly. There also seems to be another "bug" related to cross-crate re-exports and where clauses: In the core docs, the impl looks like this (which is how it's actually written in the source):
But in the std docs, the impl looks like this, with all of the bounds expressed as where clauses:
I think the re-exported version is actually better, because it's easier to read, but they should at least be consistent.
Activity
GuillaumeGomez commentedon Sep 19, 2021
Found the issue: it's because we use a
BTreeMapusingSymbolas key. Problem being thatSymbolis making integer based comparison and not string based, hence the current result. Trying to write a test now.camelid commentedon Sep 22, 2021
Note that this bug is specific to cross-crate re-exports; the same documentation in
corerenders correctly. There also seems to be another "bug" related to cross-crate re-exports andwhereclauses: In thecoredocs, the impl looks like this (which is how it's actually written in the source):But in the
stddocs, the impl looks like this, with all of the bounds expressed aswhereclauses:I think the re-exported version is actually better, because it's easier to read, but they should at least be consistent.
Rollup merge of rust-lang#89098 - GuillaumeGomez:where-bounds-order, …
Rollup merge of rust-lang#89098 - GuillaumeGomez:where-bounds-order, …