File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,7 @@ E0744: include_str!("./error_codes/E0744.md"),
418
418
E0745 : include_str!( "./error_codes/E0745.md" ) ,
419
419
E0746 : include_str!( "./error_codes/E0746.md" ) ,
420
420
E0747 : include_str!( "./error_codes/E0747.md" ) ,
421
+ E0748 : include_str!( "./error_codes/E0748.md" ) ,
421
422
;
422
423
// E0006, // merged with E0005
423
424
// E0008, // cannot bind by-move into a pattern guard
Original file line number Diff line number Diff line change 1
1
use rustc_data_structures:: sync:: Lrc ;
2
- use rustc_errors:: { DiagnosticBuilder , FatalError } ;
2
+ use rustc_errors:: { error_code , DiagnosticBuilder , FatalError } ;
3
3
use rustc_lexer:: unescape;
4
4
use rustc_lexer:: Base ;
5
5
use rustc_session:: parse:: ParseSess ;
@@ -495,7 +495,11 @@ impl<'a> StringReader<'a> {
495
495
}
496
496
497
497
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
+ ) ;
499
503
err. span_label ( self . mk_sp ( start, start) , "unterminated raw string" ) ;
500
504
501
505
if n_hashes > 0 {
You can’t perform that action at this time.
0 commit comments