Allow for more efficient sorting when exporting Unord collections.

This commit is contained in:
Michael Woerister 2023-01-18 10:47:31 +01:00
parent 465ed5bd46
commit c1b358945a
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ impl<'tcx> LateLintPass<'tcx> for MultipleInherentImpl {
let inherent_impls = cx
.tcx
.with_stable_hashing_context(|hcx| cx.tcx.crate_inherent_impls(()).inherent_impls.to_sorted(&hcx));
.with_stable_hashing_context(|hcx| cx.tcx.crate_inherent_impls(()).inherent_impls.to_sorted(&hcx, true));
for (_, impl_ids) in inherent_impls.into_iter().filter(|(&id, impls)| {
impls.len() > 1

View File

@ -81,7 +81,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingTraitMethods {
}
cx.tcx.with_stable_hashing_context(|hcx| {
for assoc in provided.values_sorted(&hcx) {
for assoc in provided.values_sorted(&hcx, true) {
let source_map = cx.tcx.sess.source_map();
let definition_span = source_map.guess_head_span(cx.tcx.def_span(assoc.def_id));