Sort errors

This commit is contained in:
Esteban Küber 2023-10-30 22:19:17 +00:00
parent 8c5577283c
commit b8a8ba9c91
6 changed files with 15 additions and 13 deletions

View file

@ -585,9 +585,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
}
}
let names = names
let mut names = names
.into_iter()
.map(|(trait_, assocs)| {
.map(|(trait_, mut assocs)| {
assocs.sort();
format!(
"{} in `{trait_}`",
match &assocs[..] {
@ -600,8 +601,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
}
)
})
.collect::<Vec<String>>()
.join(", ");
.collect::<Vec<String>>();
names.sort();
let names = names.join(", ");
trait_bound_spans.sort();
let mut err = struct_span_err!(