-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an AST
Description
Everywhere in the language we treat \r\n as \n, and forbid bare \r. In particular, in raw strings we do translate \r\n to \n, which makes sense, given that line ending depends on git config.
However, for raw byte string literals we don't do this, and this looks like a bug?
16:22:13|~/tmp
λ echo -e "fn main() {\n let (s1, s2) = (br\"\r\", br\"\r\n\");\n println!(\"{:?} {:?}\", s1, s2);\n}" > main.rs
16:25:49|~/tmp
λ rustc main.rs
16:25:50|~/tmp
λ ./main
[13] [13, 10]
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an AST