Closed
Description
Using Windows style (or Mac OS 9) style line endings results in "unknown string escape: \r" when attempting to use a multiline string literal.
test.rs:2:26: 2:27 error: unknown string escape: \r
test.rs:2 let string = ~"This is \
^
fn main() {
let string = "This is \
a test";
}
When cloning a rust library, git automatically converted the Linux style line endings to Windows which caused compilation to fail.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
SiegeLord commentedon Jan 20, 2014
Discussion in #7946 seems relevant, although it only directly relates to CR-only line endings. The Rust repository specifically disables that feature of git via .gitattributes (see #9214) which is something one could do in the meantime/if this issue is determined to be a non-issue.
huonw commentedon Feb 17, 2014
It would be good to at least special case this to emit a more useful error message, even if it's not legal.
\
escape error in CR LF line mode. #12821Auto merge of rust-lang#11669 - y21:issue11577, r=Jarcho