about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs3
1 files changed, 1 insertions, 2 deletions
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<SubdiagnosticMessage>,
-        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 }],