Files
rust/tests/rustdoc-html
Jonathan Brouwer b0d9ae60e1 Rollup merge of #156401 - shivendra02467:doc-cfg-sort-fix, r=GuillaumeGomez
rustdoc: deterministic sorting for `doc_cfg` badges

Fixes rust-lang/rust#156391

Currently, target-exclusive `doc_cfg` badges (eg. "Available on...") reuse the order of predicates as they appear in the source code. This often buries popular targets behind niche ones and leads to inconsistent UI rendering.

This PR introduces a deterministic sorting mechanism to the `Cfg` AST prior to HTML/JSON rendering.

**Note for Reviewers:**
To provide the best UX, I implemented a lightweight tiering heuristic (prioritizing major platforms like Linux/Apple/Windows first, followed by mobile, then BSDs, and alphabetizing the rest). However, I am completely open to tweaking these priority groupings or falling back to a different sorting logic if the team prefers. Let me know what you think!
2026-05-28 14:59:41 +02:00
..
2026-04-01 23:05:42 +01:00
2026-02-24 11:41:26 -05:00
2026-05-10 02:37:58 +02:00
2026-02-10 18:00:54 +00:00