Skip to content

Commit 4108ac4

Browse files
committed
rustc_errors: fix inaccurate comment
1 parent 789baed commit 4108ac4

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
@@ -2612,9 +2612,9 @@ const OUTPUT_REPLACEMENTS: phf::Map<char, &'static str> = phf::phf_map![
26122612
];
26132613

26142614
fn normalize_whitespace(s: &str) -> String {
2615-
// Scan the input string for a character in the ordered table above. If it's present, replace
2616-
// it with it's alternative string (it can be more than 1 char!). Otherwise, retain the input
2617-
// char. At the end, allocate all chars into a string in one operation.
2615+
// Scan the input string for a character in the replacement table above.
2616+
// If it's present, replace it with its alternative string (it can be more than 1 char!).
2617+
// Otherwise, retain the input char.
26182618
s.chars().fold(String::with_capacity(s.len()), |mut s, c| {
26192619
match OUTPUT_REPLACEMENTS.get(&c) {
26202620
Some(r) => s.push_str(r),

0 commit comments

Comments
 (0)