1
Fork 0

Rollup merge of #96752 - scottmcm:error-sorting, r=compiler-errors

Put the incompatible_closure_captures lint messages in alphabetical order

Looks like they were in hash order before, which was causing me trouble in #94598, so this PR sorts the errors by trait name.
This commit is contained in:
Guillaume Gomez 2022-05-06 20:05:42 +02:00 committed by GitHub
commit 28d85ab8c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View file

@ -914,6 +914,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
reasons.auto_traits.extend(auto_trait_reasons);
reasons.drop_order = drop_order;
// `auto_trait_reasons` are in hashset order, so sort them to put the
// diagnostics we emit later in a cross-platform-consistent order.
reasons.auto_traits.sort_unstable();
reasons
}