Skip to content

Commit bae5f39

Browse files
Add E0747 error code
1 parent e2223c9 commit bae5f39

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/librustc_error_codes/error_codes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ E0744: include_str!("./error_codes/E0744.md"),
418418
E0745: include_str!("./error_codes/E0745.md"),
419419
E0746: include_str!("./error_codes/E0746.md"),
420420
E0747: include_str!("./error_codes/E0747.md"),
421+
E0748: include_str!("./error_codes/E0748.md"),
421422
;
422423
// E0006, // merged with E0005
423424
// E0008, // cannot bind by-move into a pattern guard

src/librustc_parse/lexer/mod.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_data_structures::sync::Lrc;
2-
use rustc_errors::{DiagnosticBuilder, FatalError};
2+
use rustc_errors::{error_code, DiagnosticBuilder, FatalError};
33
use rustc_lexer::unescape;
44
use rustc_lexer::Base;
55
use rustc_session::parse::ParseSess;
@@ -495,7 +495,11 @@ impl<'a> StringReader<'a> {
495495
}
496496

497497
fn report_unterminated_raw_string(&self, start: BytePos, n_hashes: usize) -> ! {
498-
let mut err = self.struct_span_fatal(start, start, "unterminated raw string");
498+
let mut err = self.sess.span_diagnostic.struct_span_fatal_with_code(
499+
self.mk_sp(start, start),
500+
"unterminated raw string",
501+
error_code!(E0748),
502+
);
499503
err.span_label(self.mk_sp(start, start), "unterminated raw string");
500504

501505
if n_hashes > 0 {

0 commit comments

Comments
 (0)