Tobias Bucher
ce6baa77fe
Clarify how Rust treats backslashes at end of line in string literals
...
Rust differs in that behavior from C: In C, the newline escapes are resolved
before anything else, and in Rust this depends on whether the backslash is
escaped itself.
A difference can be observed in the following two programs:
```c
#include <stdio.h>
int main()
{
printf("\\
n\n");
return 0;
}
```
```rust
fn main() {
println!("\\
n");
}
```
The first program prints two newlines, the second one prints a backslash, a
newline, the latin character n and a final newline.
2016-01-06 00:04:25 +01:00
..
2015-12-17 05:43:27 +00:00
2016-01-06 00:04:25 +01:00
2015-12-25 15:46:36 -05:00
2015-12-24 21:39:38 -05:00
2015-12-21 13:34:48 -08:00
2015-12-31 11:42:16 +00:00
2015-12-21 22:12:48 -08:00
2015-12-21 09:26:21 -08:00
2015-12-21 09:26:21 -08:00
2016-01-02 22:36:50 +01:00
2015-12-13 01:02:12 -05:00
2016-01-05 10:24:37 +00:00
2016-01-04 18:23:33 +00:00
2015-12-21 09:26:21 -08:00
2015-12-21 09:26:21 -08:00
2015-12-21 09:26:21 -08:00
2015-12-21 09:26:21 -08:00
2015-12-21 13:36:23 +01:00
2015-12-21 09:26:21 -08:00
2016-01-01 04:28:26 -08:00
2015-12-28 12:15:44 -05:00
2016-01-04 16:11:33 -06:00
2015-12-22 09:15:29 +00:00
2015-12-21 09:26:21 -08:00
2015-12-30 14:27:59 +13:00
2015-12-21 09:26:21 -08:00
2015-12-30 14:27:59 +13:00
2015-12-22 17:12:33 +01:00
2015-12-30 14:27:59 +13:00
2015-12-21 09:26:21 -08:00
2016-01-02 16:56:15 +00:00
2016-01-04 16:11:33 -06:00
2015-12-21 09:26:21 -08:00
2015-12-30 14:27:59 +13:00
2015-12-30 14:27:59 +13:00
2015-12-30 14:54:36 +13:00
2016-01-04 22:09:52 +00:00
2015-12-31 01:12:38 +00:00
2015-12-21 09:26:21 -08:00
2016-01-02 21:38:36 -05:00
2015-12-21 09:26:21 -08:00
2016-01-04 00:27:40 +00:00
2016-01-04 01:13:57 +01:00
2015-12-30 14:27:59 +13:00
2015-12-21 09:26:21 -08:00
2015-12-22 14:10:17 +01:00
2015-12-22 09:03:46 -08:00
2015-12-21 09:26:21 -08:00
2016-01-05 05:20:27 +00:00
2015-12-30 09:02:02 -08:00