Rustdoc incorrectly orders trait impls
Documentation for Rc: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html
Source code: https://doc.rust-lang.org/nightly/src/alloc/rc.rs.html#263-265
In the source impls for !Send and !Sync come one after another. In the generated documentation they don't.
The docs should respect the order of impls in the source - that's what I've been told in the #rust-docs channel. In fact, other impls for Rc apparently don't follow the order from the source either. What order do they follow? :)
Triage: on nightly, these now happen to match the source order, but I think because they're in alphabetical order, not because rustdoc is trying to match the original order; Borrow is shown after AsRef even though it comes earlier in source order.

Matching source order seems useful to me, but conflicts with https://github.com/rust-lang/rust/issues/51129. Maybe we should give sorting
Traitand!Traitprecedence, and then sort by source order after that? Sorting by alphabetical order also seems reasonable, though.jyn at 2021-07-07 04:30:23
What is the situation here?
Marijn Schouten at 2025-02-07 06:41:45