Skip to content

Commit a21c045

Browse files
committed
Improve comments.
Remove a low-value comment, remove a duplicate comment, and correct a third comment.
1 parent 7dbf2c0 commit a21c045

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_lexer/src/unescape.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,9 @@ where
8484
Mode::Char | Mode::Byte => {
8585
let mut chars = src.chars();
8686
let result = unescape_char_or_byte(&mut chars, mode == Mode::Byte);
87-
// The Chars iterator moved forward.
8887
callback(0..(src.len() - chars.as_str().len()), result);
8988
}
9089
Mode::Str | Mode::ByteStr => unescape_str_or_byte_str(src, mode == Mode::ByteStr, callback),
91-
// NOTE: Raw strings do not perform any explicit character escaping, here we
92-
// only translate CRLF to LF and produce errors on bare CR.
9390
Mode::RawStr | Mode::RawByteStr => {
9491
unescape_raw_str_or_raw_byte_str(src, mode == Mode::RawByteStr, callback)
9592
}
@@ -333,7 +330,7 @@ where
333330
/// Takes a contents of a string literal (without quotes) and produces a
334331
/// sequence of characters or errors.
335332
/// NOTE: Raw strings do not perform any explicit character escaping, here we
336-
/// only translate CRLF to LF and produce errors on bare CR.
333+
/// only produce errors on bare CR.
337334
fn unescape_raw_str_or_raw_byte_str<F>(src: &str, is_byte: bool, callback: &mut F)
338335
where
339336
F: FnMut(Range<usize>, Result<char, EscapeError>),

0 commit comments

Comments
 (0)