about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-11-08 18:24:49 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-11-19 17:50:45 +0000
commitf1ae02f4bd971acc384ed3422e235fb1eb07dfa7 (patch)
tree915a591704f55e32991c03b55600a5ba13d7a3a2 /compiler/rustc_hir_analysis
parent42aa1273b0dd317c4aafdcf649f40cbad4499b60 (diff)
downloadrust-f1ae02f4bd971acc384ed3422e235fb1eb07dfa7.tar.gz
rust-f1ae02f4bd971acc384ed3422e235fb1eb07dfa7.zip
Don't sort `span_suggestions`, leave that to caller
Diffstat (limited to 'compiler/rustc_hir_analysis')
-rw-r--r--compiler/rustc_hir_analysis/src/astconv/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs
index 8126b451181..3542fc7cd33 100644
--- a/compiler/rustc_hir_analysis/src/astconv/mod.rs
+++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs
@@ -945,7 +945,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
                 Applicability::MachineApplicable,
             );
         } else {
-            match (types, traits) {
+            let mut types = types.to_vec();
+            types.sort();
+            let mut traits = traits.to_vec();
+            traits.sort();
+            match (&types[..], &traits[..]) {
                 ([], []) => {
                     err.span_suggestion_verbose(
                         span,