-
Notifications
You must be signed in to change notification settings - Fork 13.3k
End-of-line backslash in string literal should be documented #22698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also added this to the Hello World Tutorial, was that a bad thing? |
jxcl
added a commit
to jxcl/rust
that referenced
this issue
Feb 26, 2015
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Feb 26, 2015
r? @steveklabnik Closes rust-lang#22698 I wasn't sure that this was appropriate for the book, but I've added this to the reference. I also noticed that one of the U+ symbols in the character literals section was missing the graves.
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Feb 27, 2015
r? @steveklabnik Closes rust-lang#22698 I wasn't sure that this was appropriate for the book, but I've added this to the reference. I also noticed that one of the U+ symbols in the character literals section was missing the graves.
dlrobertson
pushed a commit
to dlrobertson/rust
that referenced
this issue
Nov 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rust has a feature in non-raw string literals where a backslash right before a newline causes that newline, plus all whitespace at the beginning of the next line, to be ignored. That makes it so that you can indent the insides of string literals without the indentation being part of the program. For instance:
prints
foobar
.That's is a nice feature, but it appears nowhere (at least nowhere obvious that I can find from a brief search) in either in the book or the reference.
The text was updated successfully, but these errors were encountered: