Skip to content

Commit 03906c5

Browse files
committed
rustc_errors: fix inaccurate comment
1 parent bde59d0 commit 03906c5

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

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

0 commit comments

Comments
 (0)