mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
Fix ==
in in format causes mismatched-arg-count
This commit is contained in:
parent
a9814fa9c0
commit
74a557857b
@ -259,7 +259,8 @@ fn format_args_expand(
|
||||
}
|
||||
for arg in &mut args {
|
||||
// Remove `key =`.
|
||||
if matches!(arg.get(1), Some(tt::TokenTree::Leaf(tt::Leaf::Punct(p))) if p.char == '=') {
|
||||
if matches!(arg.get(1), Some(tt::TokenTree::Leaf(tt::Leaf::Punct(p))) if p.char == '=' && p.spacing != tt::Spacing::Joint)
|
||||
{
|
||||
arg.drain(..2);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user