This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,7 @@ E0758: include_str!("./error_codes/E0758.md"),
442442E0760 : include_str!( "./error_codes/E0760.md" ) ,
443443E0761 : include_str!( "./error_codes/E0761.md" ) ,
444444E0762 : include_str!( "./error_codes/E0762.md" ) ,
445+ E0763 : include_str!( "./error_codes/E0763.md" ) ,
445446;
446447// E0006, // merged with E0005
447448// E0008, // cannot bind by-move into a pattern guard
Original file line number Diff line number Diff line change 1+ A byte constant wasn't correctly ended.
2+
3+ Erroneous code example:
4+
5+ ``` compile_fail,E0763
6+ let c = b'a; // error!
7+ ```
8+
9+ To fix this error, add the missing quote:
10+
11+ ```
12+ let c = b'a'; // ok!
13+ ```
Original file line number Diff line number Diff line change @@ -339,8 +339,15 @@ impl<'a> StringReader<'a> {
339339 }
340340 rustc_lexer:: LiteralKind :: Byte { terminated } => {
341341 if !terminated {
342- self . fatal_span_ ( start + BytePos ( 1 ) , suffix_start, "unterminated byte constant" )
343- . raise ( )
342+ self . sess
343+ . span_diagnostic
344+ . struct_span_fatal_with_code (
345+ self . mk_sp ( start + BytePos ( 1 ) , suffix_start) ,
346+ "unterminated byte constant" ,
347+ error_code ! ( E0763 ) ,
348+ )
349+ . emit ( ) ;
350+ FatalError . raise ( ) ;
344351 }
345352 ( token:: Byte , Mode :: Byte , 2 , 1 ) // b' '
346353 }
You can’t perform that action at this time.
0 commit comments