about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Woodcraft <matthew@woodcraft.me.uk>2024-01-28 19:30:00 +0000
committerMatthew Woodcraft <matthew@woodcraft.me.uk>2024-01-28 19:30:41 +0000
commit67558055e39ee44be32ad4eb77052b1cd2ee3158 (patch)
tree807fccf499cb4f7201f01e4dbc042cb0bc7476d8
parent635124704849eeead4e3a7bb6e663c5351571d93 (diff)
downloadrust-67558055e39ee44be32ad4eb77052b1cd2ee3158.tar.gz
rust-67558055e39ee44be32ad4eb77052b1cd2ee3158.zip
normalize_newlines(): fix incorrect comment
-rw-r--r--compiler/rustc_span/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 65702f76fda..ea6766ea583 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -2105,7 +2105,7 @@ fn remove_bom(src: &mut String, normalized_pos: &mut Vec<NormalizedPos>) {
 
 /// Replaces `\r\n` with `\n` in-place in `src`.
 ///
-/// Returns error if there's a lone `\r` in the string.
+/// Leaves any occurrences of lone `\r` unchanged.
 fn normalize_newlines(src: &mut String, normalized_pos: &mut Vec<NormalizedPos>) {
     if !src.as_bytes().contains(&b'\r') {
         return;