diff --git a/impl/src/fmt.rs b/impl/src/fmt.rs index 1fc290e..f63fa68 100644 --- a/impl/src/fmt.rs +++ b/impl/src/fmt.rs @@ -138,7 +138,7 @@ fn explicit_named_args(input: ParseStream) -> Result> { } fn try_explicit_named_args(input: ParseStream) -> Result> { - let syn_full = is_syn_full(); + let mut syn_full = None; let mut named_args = Set::new(); while !input.is_empty() { @@ -151,7 +151,7 @@ fn try_explicit_named_args(input: ParseStream) -> Result> { input.parse::()?; named_args.insert(ident); } - if syn_full { + if *syn_full.get_or_insert_with(is_syn_full) { let ahead = input.fork(); if ahead.parse::().is_ok() { input.advance_to(&ahead);