Skip to content

Commit

Permalink
Merge pull request #344 from dtolnay/binop
Browse files Browse the repository at this point in the history
Disregard equality binop in fallback parser
  • Loading branch information
dtolnay authored Nov 4, 2024
2 parents d2a823d + 08f8992 commit 372fd8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion impl/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![=]>()?;
Expand Down

0 comments on commit 372fd8a

Please # to comment.