about summary refs log tree commit diff
path: root/src/librustc_parse
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-02-18 14:50:27 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-02-28 16:01:04 +0100
commitbae5f3976b21f33d9d15ed7da04d3fb9b1878bdc (patch)
tree5d06108694bf038c3f23bdfc91b0b8cf8a034a05 /src/librustc_parse
parente2223c94bf433fc38234d1303e88cbaf14755863 (diff)
downloadrust-bae5f3976b21f33d9d15ed7da04d3fb9b1878bdc.tar.gz
rust-bae5f3976b21f33d9d15ed7da04d3fb9b1878bdc.zip
Add E0747 error code
Diffstat (limited to 'src/librustc_parse')
-rw-r--r--src/librustc_parse/lexer/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/librustc_parse/lexer/mod.rs b/src/librustc_parse/lexer/mod.rs
index 66280638a2d..face0e67992 100644
--- a/src/librustc_parse/lexer/mod.rs
+++ b/src/librustc_parse/lexer/mod.rs
@@ -1,5 +1,5 @@
 use rustc_data_structures::sync::Lrc;
-use rustc_errors::{DiagnosticBuilder, FatalError};
+use rustc_errors::{error_code, DiagnosticBuilder, FatalError};
 use rustc_lexer::unescape;
 use rustc_lexer::Base;
 use rustc_session::parse::ParseSess;
@@ -495,7 +495,11 @@ impl<'a> StringReader<'a> {
     }
 
     fn report_unterminated_raw_string(&self, start: BytePos, n_hashes: usize) -> ! {
-        let mut err = self.struct_span_fatal(start, start, "unterminated raw string");
+        let mut err = self.sess.span_diagnostic.struct_span_fatal_with_code(
+            self.mk_sp(start, start),
+            "unterminated raw string",
+            error_code!(E0748),
+        );
         err.span_label(self.mk_sp(start, start), "unterminated raw string");
 
         if n_hashes > 0 {