Closed
Description
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:
fn main() {
println!("foo\
bar");
}
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.
Metadata
Metadata
Assignees
Labels
No labels