mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Add E0747 error code
This commit is contained in:
parent
e2223c94bf
commit
bae5f3976b
@ -418,6 +418,7 @@ E0744: include_str!("./error_codes/E0744.md"),
|
||||
E0745: include_str!("./error_codes/E0745.md"),
|
||||
E0746: include_str!("./error_codes/E0746.md"),
|
||||
E0747: include_str!("./error_codes/E0747.md"),
|
||||
E0748: include_str!("./error_codes/E0748.md"),
|
||||
;
|
||||
// E0006, // merged with E0005
|
||||
// E0008, // cannot bind by-move into a pattern guard
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user