mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Fix ==
in in format causes mismatched-arg-count
This commit is contained in:
parent
a9814fa9c0
commit
74a557857b
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue