Merge pull request #344 from dtolnay/binop

Disregard equality binop in fallback parser
This commit is contained in:
David Tolnay 2024-11-04 11:49:23 -05:00 committed by GitHub
commit 372fd8a71a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -184,7 +184,11 @@ fn fallback_explicit_named_args(input: ParseStream) -> Result<FmtArguments> {
};
while !input.is_empty() {
if input.peek(Token![,]) && input.peek2(Ident::peek_any) && input.peek3(Token![=]) {
if input.peek(Token![,])
&& input.peek2(Ident::peek_any)
&& input.peek3(Token![=])
&& !input.peek3(Token![==])
{
input.parse::<Token![,]>()?;
let ident = input.call(Ident::parse_any)?;
input.parse::<Token![=]>()?;