Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b9ead99

Browse files
committed
Rename Token::is_path.
This makes it consistent with `is_whole_expr` and `is_whole_block`.
1 parent 099e716 commit b9ead99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_ast/src/token.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ impl Token {
664664
}
665665

666666
/// Returns `true` if the token is an interpolated path.
667-
fn is_path(&self) -> bool {
667+
fn is_whole_path(&self) -> bool {
668668
if let Interpolated(nt) = &self.kind
669669
&& let NtPath(..) = &nt.0
670670
{
@@ -710,7 +710,7 @@ impl Token {
710710
pub fn is_path_start(&self) -> bool {
711711
self == &ModSep
712712
|| self.is_qpath_start()
713-
|| self.is_path()
713+
|| self.is_whole_path()
714714
|| self.is_path_segment_keyword()
715715
|| self.is_ident() && !self.is_reserved_ident()
716716
}

0 commit comments

Comments
 (0)