@@ -290,7 +290,7 @@ pub enum TokenKind {
290290 /// `:`
291291 Colon ,
292292 /// `::`
293- ModSep ,
293+ PathSep ,
294294 /// `->`
295295 RArrow ,
296296 /// `<-`
@@ -393,7 +393,7 @@ impl TokenKind {
393393 BinOpEq ( Shr ) => ( Gt , Ge ) ,
394394 DotDot => ( Dot , Dot ) ,
395395 DotDotDot => ( Dot , DotDot ) ,
396- ModSep => ( Colon , Colon ) ,
396+ PathSep => ( Colon , Colon ) ,
397397 RArrow => ( BinOp ( Minus ) , Gt ) ,
398398 LArrow => ( Lt , BinOp ( Minus ) ) ,
399399 FatArrow => ( Eq , Gt ) ,
@@ -454,7 +454,9 @@ impl Token {
454454 match self . kind {
455455 Eq | Lt | Le | EqEq | Ne | Ge | Gt | AndAnd | OrOr | Not | Tilde | BinOp ( _)
456456 | BinOpEq ( _) | At | Dot | DotDot | DotDotDot | DotDotEq | Comma | Semi | Colon
457- | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar | Question | SingleQuote => true ,
457+ | PathSep | RArrow | LArrow | FatArrow | Pound | Dollar | Question | SingleQuote => {
458+ true
459+ }
458460
459461 OpenDelim ( ..) | CloseDelim ( ..) | Literal ( ..) | DocComment ( ..) | Ident ( ..)
460462 | Lifetime ( ..) | Interpolated ( ..) | Eof => false ,
@@ -481,7 +483,7 @@ impl Token {
481483 // DotDotDot is no longer supported, but we need some way to display the error
482484 DotDot | DotDotDot | DotDotEq | // range notation
483485 Lt | BinOp ( Shl ) | // associated path
484- ModSep | // global path
486+ PathSep | // global path
485487 Lifetime ( ..) | // labeled loop
486488 Pound => true , // expression attributes
487489 Interpolated ( ref nt) => matches ! ( & nt. 0 , NtLiteral ( ..) |
@@ -507,7 +509,7 @@ impl Token {
507509 // DotDotDot is no longer supported
508510 | DotDot | DotDotDot | DotDotEq // ranges
509511 | Lt | BinOp ( Shl ) // associated path
510- | ModSep => true , // global path
512+ | PathSep => true , // global path
511513 Interpolated ( ref nt) => matches ! ( & nt. 0 , NtLiteral ( ..) |
512514 NtPat ( ..) |
513515 NtBlock ( ..) |
@@ -530,7 +532,7 @@ impl Token {
530532 Question | // maybe bound in trait object
531533 Lifetime ( ..) | // lifetime bound in trait object
532534 Lt | BinOp ( Shl ) | // associated path
533- ModSep => true , // global path
535+ PathSep => true , // global path
534536 Interpolated ( ref nt) => matches ! ( & nt. 0 , NtTy ( ..) | NtPath ( ..) ) ,
535537 // For anonymous structs or unions, which only appear in specific positions
536538 // (type of struct fields or union fields), we don't consider them as regular types
@@ -708,7 +710,7 @@ impl Token {
708710 }
709711
710712 pub fn is_path_start ( & self ) -> bool {
711- self == & ModSep
713+ self == & PathSep
712714 || self . is_qpath_start ( )
713715 || self . is_whole_path ( )
714716 || self . is_path_segment_keyword ( )
@@ -821,7 +823,7 @@ impl Token {
821823 _ => return None ,
822824 } ,
823825 Colon => match joint. kind {
824- Colon => ModSep ,
826+ Colon => PathSep ,
825827 _ => return None ,
826828 } ,
827829 SingleQuote => match joint. kind {
@@ -830,7 +832,7 @@ impl Token {
830832 } ,
831833
832834 Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq ( ..) | At | DotDotDot
833- | DotDotEq | Comma | Semi | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar
835+ | DotDotEq | Comma | Semi | PathSep | RArrow | LArrow | FatArrow | Pound | Dollar
834836 | Question | OpenDelim ( ..) | CloseDelim ( ..) | Literal ( ..) | Ident ( ..)
835837 | Lifetime ( ..) | Interpolated ( ..) | DocComment ( ..) | Eof => return None ,
836838 } ;
0 commit comments