From 5d63e10318ea76efc4d4d6a33cf1f74c9839adfb Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Wed, 1 Feb 2023 17:38:56 +0000 Subject: rebase and review comments --- compiler/rustc_errors/src/diagnostic.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 5b2786fbb17..9ed8ab67431 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -612,7 +612,7 @@ impl Diagnostic { pub fn multipart_suggestion_with_style( &mut self, msg: impl Into, - mut suggestion: Vec<(Span, String)>, + suggestion: Vec<(Span, String)>, applicability: Applicability, style: SuggestionStyle, ) -> &mut Self { @@ -634,7 +634,6 @@ impl Diagnostic { None, "suggestion must not have overlapping parts", ); - suggestion.sort_by_key(|(span, _)| (span.lo(), span.hi())); self.push_suggestion(CodeSuggestion { substitutions: vec![Substitution { parts }], -- cgit 1.4.1-3-g733a5