Skip to content

Commit f439de3

Browse files
Add explanation for E0747
1 parent bae5f39 commit f439de3

File tree

1 file changed

+14
-0
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
A raw string isn't correctly terminated because the trailing `#` count doesn't
2+
match its leading `#` count.
3+
4+
Erroneous code example:
5+
6+
```compile_fail,E0748
7+
let dolphins = r##"Dolphins!"#; // error!
8+
```
9+
To terminate a raw string, you have to have the same number of `#` at the end
10+
than at the beginning. Example:
11+
```
12+
let dolphins = r#"Dolphins!"#; // one `#` at the beginning, one at the end so
13+
// all good!
14+
```

0 commit comments

Comments
 (0)