@@ -694,7 +694,7 @@ impl<'a> StringReader<'a> {
694694 accum_int *= 16 ;
695695 accum_int += c. to_digit ( 16 ) . unwrap_or_else ( || {
696696 self . err_span_char ( self . last_pos , self . pos ,
697- "illegal character in numeric character escape" , c) ;
697+ "invalid character in numeric character escape" , c) ;
698698
699699 valid = false ;
700700 0
@@ -714,7 +714,7 @@ impl<'a> StringReader<'a> {
714714 Some ( _) => valid,
715715 None => {
716716 let last_bpos = self . last_pos ;
717- self . err_span_ ( start_bpos, last_bpos, "illegal numeric character escape" ) ;
717+ self . err_span_ ( start_bpos, last_bpos, "invalid numeric character escape" ) ;
718718 false
719719 }
720720 }
@@ -846,7 +846,7 @@ impl<'a> StringReader<'a> {
846846 "unterminated unicode escape (needed a `}`)" ) ;
847847 } else {
848848 self . err_span_char ( self . last_pos , self . pos ,
849- "illegal character in unicode escape" , c) ;
849+ "invalid character in unicode escape" , c) ;
850850 }
851851 valid = false ;
852852 0
@@ -862,7 +862,7 @@ impl<'a> StringReader<'a> {
862862 }
863863
864864 if valid && ( char:: from_u32 ( accum_int) . is_none ( ) || count == 0 ) {
865- self . err_span_ ( start_bpos, self . last_pos , "illegal unicode character escape" ) ;
865+ self . err_span_ ( start_bpos, self . last_pos , "invalid unicode character escape" ) ;
866866 valid = false ;
867867 }
868868
@@ -1138,8 +1138,8 @@ impl<'a> StringReader<'a> {
11381138 let last_bpos = self . last_pos ;
11391139 let curr_char = self . curr . unwrap ( ) ;
11401140 self . fatal_span_char ( start_bpos, last_bpos,
1141- "only `#` is allowed in raw string delimitation ; \
1142- found illegal character ",
1141+ "found invalid character ; \
1142+ only `#` is allowed in raw string delimitation ",
11431143 curr_char) ;
11441144 }
11451145 self . bump ( ) ;
@@ -1323,8 +1323,8 @@ impl<'a> StringReader<'a> {
13231323 let last_pos = self . last_pos ;
13241324 let ch = self . curr . unwrap ( ) ;
13251325 self . fatal_span_char ( start_bpos, last_pos,
1326- "only `#` is allowed in raw string delimitation ; \
1327- found illegal character ",
1326+ "found invalid character ; \
1327+ only `#` is allowed in raw string delimitation ",
13281328 ch) ;
13291329 }
13301330 self . bump ( ) ;
0 commit comments