From b9ead994b3190f44d2c6910f400c62363bc82cbc Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 20 Mar 2024 06:51:49 +1100 Subject: [PATCH] Rename `Token::is_path`. This makes it consistent with `is_whole_expr` and `is_whole_block`. --- compiler/rustc_ast/src/token.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index c17020ed663..2e9c2d05370 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -664,7 +664,7 @@ pub fn is_ident_named(&self, name: Symbol) -> bool { } /// Returns `true` if the token is an interpolated path. - fn is_path(&self) -> bool { + fn is_whole_path(&self) -> bool { if let Interpolated(nt) = &self.kind && let NtPath(..) = &nt.0 { @@ -710,7 +710,7 @@ pub fn is_qpath_start(&self) -> bool { pub fn is_path_start(&self) -> bool { self == &ModSep || self.is_qpath_start() - || self.is_path() + || self.is_whole_path() || self.is_path_segment_keyword() || self.is_ident() && !self.is_reserved_ident() }