@@ -694,7 +694,7 @@ impl<'a> StringReader<'a> {
694
694
accum_int *= 16 ;
695
695
accum_int += c. to_digit ( 16 ) . unwrap_or_else ( || {
696
696
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) ;
698
698
699
699
valid = false ;
700
700
0
@@ -714,7 +714,7 @@ impl<'a> StringReader<'a> {
714
714
Some ( _) => valid,
715
715
None => {
716
716
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" ) ;
718
718
false
719
719
}
720
720
}
@@ -846,7 +846,7 @@ impl<'a> StringReader<'a> {
846
846
"unterminated unicode escape (needed a `}`)" ) ;
847
847
} else {
848
848
self . err_span_char ( self . last_pos , self . pos ,
849
- "illegal character in unicode escape" , c) ;
849
+ "invalid character in unicode escape" , c) ;
850
850
}
851
851
valid = false ;
852
852
0
@@ -862,7 +862,7 @@ impl<'a> StringReader<'a> {
862
862
}
863
863
864
864
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" ) ;
866
866
valid = false ;
867
867
}
868
868
@@ -1138,8 +1138,8 @@ impl<'a> StringReader<'a> {
1138
1138
let last_bpos = self . last_pos ;
1139
1139
let curr_char = self . curr . unwrap ( ) ;
1140
1140
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 ",
1143
1143
curr_char) ;
1144
1144
}
1145
1145
self . bump ( ) ;
@@ -1323,8 +1323,8 @@ impl<'a> StringReader<'a> {
1323
1323
let last_pos = self . last_pos ;
1324
1324
let ch = self . curr . unwrap ( ) ;
1325
1325
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 ",
1328
1328
ch) ;
1329
1329
}
1330
1330
self . bump ( ) ;
0 commit comments