about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorPavel Grigorenko <GrigorenkoPV@ya.ru>2024-08-01 01:02:25 +0300
committerPavel Grigorenko <GrigorenkoPV@ya.ru>2024-08-06 09:26:47 +0300
commit15982b2fcae0fba61816dbd31617bc6604e36af5 (patch)
treef10a96a6086af4b83a42ae778988abb7a88bbda9 /compiler/rustc_errors/src
parentb0a89441208e56f85b5c51eccde89275f667f787 (diff)
downloadrust-15982b2fcae0fba61816dbd31617bc6604e36af5.tar.gz
rust-15982b2fcae0fba61816dbd31617bc6604e36af5.zip
rustc_errors: fix inaccurate comment
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/emitter.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 0e9c7ef5fb3..ef9194022b5 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -2624,9 +2624,9 @@ fn normalize_whitespace(s: &str) -> String {
             i += 1;
         }
     }
-    // Scan the input string for a character in the ordered table above. If it's present, replace
-    // it with it's alternative string (it can be more than 1 char!). Otherwise, retain the input
-    // char. At the end, allocate all chars into a string in one operation.
+    // Scan the input string for a character in the ordered table above.
+    // If it's present, replace it with its alternative string (it can be more than 1 char!).
+    // Otherwise, retain the input char.
     s.chars().fold(String::with_capacity(s.len()), |mut s, c| {
         match OUTPUT_REPLACEMENTS.binary_search_by_key(&c, |(k, _)| *k) {
             Ok(i) => s.push_str(OUTPUT_REPLACEMENTS[i].1),