Skip to content

Commit

Permalink
Rollup merge of #120453 - mattheww:2024-01_normalize_newlines, r=oli-obk
Browse files Browse the repository at this point in the history
Fix incorrect comment in normalize_newlines

The incorrect comment seems to be left over from sometime before this function was first merged.
  • Loading branch information
Dylan-DPC committed Jan 29, 2024
2 parents eaa1002 + 6755805 commit 15e8b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 15e8b90

Please sign in to comment.