mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Merge #7105
7105: Fix `==` in in format causes mismatched-arg-count r=edwin0cheng a=edwin0cheng Fixes #7085 Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
commit
558206f70e
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…
Reference in a new issue