From 08f89925bf0df7a3fe758129e4dbea1097c48bce Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 4 Nov 2024 11:45:52 -0500 Subject: [PATCH] Disregard equality binop in fallback parser --- impl/src/fmt.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/impl/src/fmt.rs b/impl/src/fmt.rs index 7d07d55..3d1394c 100644 --- a/impl/src/fmt.rs +++ b/impl/src/fmt.rs @@ -184,7 +184,11 @@ fn fallback_explicit_named_args(input: ParseStream) -> Result { }; 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::()?; let ident = input.call(Ident::parse_any)?; input.parse::()?;