diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-11-08 18:24:49 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-11-19 17:50:45 +0000 |
| commit | f1ae02f4bd971acc384ed3422e235fb1eb07dfa7 (patch) | |
| tree | 915a591704f55e32991c03b55600a5ba13d7a3a2 /compiler/rustc_hir_analysis | |
| parent | 42aa1273b0dd317c4aafdcf649f40cbad4499b60 (diff) | |
| download | rust-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.rs | 6 |
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, |
