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
|
@ -1336,7 +1336,7 @@ impl<'a> Parser<'a> {
|
|||
) -> bool {
|
||||
if let ExprKind::Binary(op, l1, r1) = &inner_op.kind {
|
||||
if let ExprKind::Field(_, ident) = l1.kind
|
||||
&& ident.as_str().parse::<i32>().is_err()
|
||||
&& !ident.is_numeric()
|
||||
&& !matches!(r1.kind, ExprKind::Lit(_))
|
||||
{
|
||||
// The parser has encountered `foo.bar<baz`, the likelihood of the turbofish
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue