diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-20 06:51:49 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-21 09:00:26 +1100 |
| commit | b9ead994b3190f44d2c6910f400c62363bc82cbc (patch) | |
| tree | 84df430786e280785708567bc88a0259dfe220c9 | |
| parent | 099e71650277642db453c157b529c961705f36b5 (diff) | |
| download | rust-b9ead994b3190f44d2c6910f400c62363bc82cbc.tar.gz rust-b9ead994b3190f44d2c6910f400c62363bc82cbc.zip | |
Rename `Token::is_path`.
This makes it consistent with `is_whole_expr` and `is_whole_block`.
| -rw-r--r-- | compiler/rustc_ast/src/token.rs | 4 |
1 files 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 @@ impl Token { } /// 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 @@ impl Token { 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() } |
