]> git.lizzy.rs Git - rust.git/commitdiff
Add explanation for E0747
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 18 Feb 2020 13:50:40 +0000 (14:50 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 28 Feb 2020 15:01:04 +0000 (16:01 +0100)
src/librustc_error_codes/error_codes/E0748.md [new file with mode: 0644]

diff --git a/src/librustc_error_codes/error_codes/E0748.md b/src/librustc_error_codes/error_codes/E0748.md
new file mode 100644 (file)
index 0000000..7743c72
--- /dev/null
@@ -0,0 +1,14 @@
+A raw string isn't correctly terminated because the trailing `#` count doesn't
+match its leading `#` count.
+
+Erroneous code example:
+
+```compile_fail,E0748
+let dolphins = r##"Dolphins!"#; // error!
+```
+To terminate a raw string, you have to have the same number of `#` at the end
+than at the beginning. Example:
+```
+let dolphins = r#"Dolphins!"#; // one `#` at the beginning, one at the end so
+                               // all good!
+```