about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-02-01 17:38:56 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-02-14 20:22:10 +0000
commit5d63e10318ea76efc4d4d6a33cf1f74c9839adfb (patch)
tree7bac8c472be48675a1b63380f9cb31c43c246c24 /compiler/rustc_errors/src
parent287cd5974c3fc7c885500036ffc8305ac978bede (diff)
downloadrust-5d63e10318ea76efc4d4d6a33cf1f74c9839adfb.tar.gz
rust-5d63e10318ea76efc4d4d6a33cf1f74c9839adfb.zip
rebase and review comments
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 }],