Skip parenthesis around tuple struct field calls
This commit is contained in:
parent
c95f9f50de
commit
26bb4e6464
4 changed files with 11 additions and 3 deletions
|
@ -2707,6 +2707,12 @@ impl Ident {
|
|||
pub fn is_raw_guess(self) -> bool {
|
||||
self.name.can_be_raw() && self.is_reserved()
|
||||
}
|
||||
|
||||
/// Whether this would be the identifier for a tuple field like `self.0`, as
|
||||
/// opposed to a named field like `self.thing`.
|
||||
pub fn is_numeric(self) -> bool {
|
||||
!self.name.is_empty() && self.as_str().bytes().all(|b| b.is_ascii_digit())
|
||||
}
|
||||
}
|
||||
|
||||
/// Collect all the keywords in a given edition into a vector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue