We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e6a193 commit dc0fba0Copy full SHA for dc0fba0
compiler/rustc_session/src/code_stats.rs
@@ -232,9 +232,13 @@ impl CodeStats {
232
.map(|(_did, stats)| stats)
233
.collect::<Vec<_>>();
234
235
- // Sort by the cost % in reverse order (from biggest to smallest)
+ // Primary sort: cost % in reverse order (from largest to smallest)
236
+ // Secondary sort: trait_name
237
infos.sort_by(|a, b| {
- a.upcasting_cost_percent.total_cmp(&b.upcasting_cost_percent).reverse()
238
+ a.upcasting_cost_percent
239
+ .total_cmp(&b.upcasting_cost_percent)
240
+ .reverse()
241
+ .then_with(|| a.trait_name.cmp(&b.trait_name))
242
});
243
244
for VTableSizeInfo {
0 commit comments