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
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.
…r=camelid
Fix generics where bounds order
Fixesrust-lang#88809.
Like said on the above issue, the issue is that we were expecting `Symbol` comparisons to be string-based but they are integer-based (because `Symbol` is an integer), messing up the bounds order. To fix it, I simply stored into a `FxIndexMap` instead.
r? `@jyn514`
On https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html:
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.The text was updated successfully, but these errors were encountered: