Skip to content

Commit

Permalink
Disregard equality binop in fallback parser
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 4, 2024
1 parent d2a823d commit 08f8992
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 08f8992

Please sign in to comment.