Skip to content

Commit 7b261d8

Browse files
committed
rustc_errors: fix inaccurate comment
1 parent 2a7ee4d commit 7b261d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_errors/src/emitter.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2619,9 +2619,9 @@ fn normalize_whitespace(s: &str) -> String {
26192619
i += 1;
26202620
}
26212621
}
2622-
// Scan the input string for a character in the ordered table above. If it's present, replace
2623-
// it with it's alternative string (it can be more than 1 char!). Otherwise, retain the input
2624-
// char. At the end, allocate all chars into a string in one operation.
2622+
// Scan the input string for a character in the ordered table above.
2623+
// If it's present, replace it with its alternative string (it can be more than 1 char!).
2624+
// Otherwise, retain the input char.
26252625
s.chars().fold(String::with_capacity(s.len()), |mut s, c| {
26262626
match OUTPUT_REPLACEMENTS.binary_search_by_key(&c, |(k, _)| *k) {
26272627
Ok(i) => s.push_str(OUTPUT_REPLACEMENTS[i].1),

0 commit comments

Comments
 (0)