diff options
| author | yukang <moorekang@gmail.com> | 2024-05-15 10:26:07 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2024-05-15 10:28:44 +0800 |
| commit | 75895f59b0742126a7b5abeb86b35df2dfa8ee59 (patch) | |
| tree | f00fcd07109aa7d921f6f17070e1ca867c71a8f2 /compiler/rustc_errors/src | |
| parent | 8387315ab3c26a57a1f53a90f188f0bc88514bca (diff) | |
| download | rust-75895f59b0742126a7b5abeb86b35df2dfa8ee59.tar.gz rust-75895f59b0742126a7b5abeb86b35df2dfa8ee59.zip | |
Fix the dedup error because of spans from suggestion
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 1610135a0ef..18bb71bd99f 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -896,7 +896,7 @@ impl<'a, G: EmissionGuarantee> Diag<'a, G> { style: SuggestionStyle, ) -> &mut Self { suggestion.sort_unstable(); - suggestion.dedup(); + suggestion.dedup_by(|(s1, m1), (s2, m2)| s1.source_equal(*s2) && m1 == m2); let parts = suggestion .into_iter() |
