1
Fork 0

Fix the dedup error because of spans from suggestion

This commit is contained in:
yukang 2024-05-15 10:26:07 +08:00
parent 8387315ab3
commit 75895f59b0
3 changed files with 47 additions and 1 deletions

View file

@ -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()