Skip to content

Commit 44fb4db

Browse files
committed
Fix the dedup error because of spans from suggestion
1 parent 8387315 commit 44fb4db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_errors/src/diagnostic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ impl<'a, G: EmissionGuarantee> Diag<'a, G> {
896896
style: SuggestionStyle,
897897
) -> &mut Self {
898898
suggestion.sort_unstable();
899-
suggestion.dedup();
899+
suggestion.dedup_by(|(s1, m1), (s2, m2)| s1.source_equal(*s2) && m1 == m2);
900900

901901
let parts = suggestion
902902
.into_iter()

0 commit comments

Comments
 (0)