@@ -72,7 +72,7 @@ pub enum TokenKind {
7272 /// prefixes are reported as errors; in earlier editions, they result in a
7373 /// (allowed by default) lint, and are treated as regular identifier
7474 /// tokens.
75- BadPrefix ,
75+ UnknownPrefix ,
7676 /// "12_u8", "1.0e-40", "b"123"". See `LiteralKind` for more details.
7777 Literal { kind : LiteralKind , suffix_start : usize } ,
7878 /// "'a"
@@ -330,7 +330,7 @@ impl Cursor<'_> {
330330 let kind = RawStr { n_hashes, err } ;
331331 Literal { kind, suffix_start }
332332 }
333- _ => self . ident_or_bad_prefix ( ) ,
333+ _ => self . ident_or_unknown_prefix ( ) ,
334334 } ,
335335
336336 // Byte literal, byte string literal, raw byte string literal or identifier.
@@ -365,12 +365,12 @@ impl Cursor<'_> {
365365 let kind = RawByteStr { n_hashes, err } ;
366366 Literal { kind, suffix_start }
367367 }
368- _ => self . ident_or_bad_prefix ( ) ,
368+ _ => self . ident_or_unknown_prefix ( ) ,
369369 } ,
370370
371371 // Identifier (this should be checked after other variant that can
372372 // start as identifier).
373- c if is_id_start ( c) => self . ident_or_bad_prefix ( ) ,
373+ c if is_id_start ( c) => self . ident_or_unknown_prefix ( ) ,
374374
375375 // Numeric literal.
376376 c @ '0' ..='9' => {
@@ -494,14 +494,14 @@ impl Cursor<'_> {
494494 RawIdent
495495 }
496496
497- fn ident_or_bad_prefix ( & mut self ) -> TokenKind {
497+ fn ident_or_unknown_prefix ( & mut self ) -> TokenKind {
498498 debug_assert ! ( is_id_start( self . prev( ) ) ) ;
499499 // Start is already eaten, eat the rest of identifier.
500500 self . eat_while ( is_id_continue) ;
501- // Good prefixes must have been handled earlier. So if
502- // we see a prefix here, it is definitely a bad prefix.
501+ // Known prefixes must have been handled earlier. So if
502+ // we see a prefix here, it is definitely a unknown prefix.
503503 match self . first ( ) {
504- '#' | '"' | '\'' => BadPrefix ,
504+ '#' | '"' | '\'' => UnknownPrefix ,
505505 _ => Ident ,
506506 }
507507 }
0 commit comments