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.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index b379d17dc22..1c1da89c557 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -759,9 +759,6 @@ impl Diagnostic {
         suggestions: impl IntoIterator<Item = String>,
         applicability: Applicability,
     ) -> &mut Self {
-        let mut suggestions: Vec<_> = suggestions.into_iter().collect();
-        suggestions.sort();
-
         self.span_suggestions_with_style(
             sp,
             msg,
@@ -771,9 +768,7 @@ impl Diagnostic {
         )
     }
 
-    /// [`Diagnostic::span_suggestions()`] but you can set the [`SuggestionStyle`]. This version
-    /// *doesn't* sort the suggestions, so the caller has control of the order in which they are
-    /// presented.
+    /// [`Diagnostic::span_suggestions()`] but you can set the [`SuggestionStyle`].
     pub fn span_suggestions_with_style(
         &mut self,
         sp: Span,