diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-31 10:04:19 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-31 10:04:19 +0000 |
commit | 558206f70e418730967fd690f5f219993de071bc (patch) | |
tree | 81f0197f6834f55fe3ac04e3e9bc6920215a0206 /crates | |
parent | a90bc53df78852e4273477acffa14198a2408815 (diff) | |
parent | 74a557857b95622abde85cdb20791a05c586db75 (diff) |
Merge #7105
7105: Fix `==` in in format causes mismatched-arg-count r=edwin0cheng a=edwin0cheng
Fixes #7085
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_expand/src/builtin_macro.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_expand/src/builtin_macro.rs b/crates/hir_expand/src/builtin_macro.rs index 6382521fb..80b60d59f 100644 --- a/crates/hir_expand/src/builtin_macro.rs +++ b/crates/hir_expand/src/builtin_macro.rs | |||
@@ -259,7 +259,8 @@ fn format_args_expand( | |||
259 | } | 259 | } |
260 | for arg in &mut args { | 260 | for arg in &mut args { |
261 | // Remove `key =`. | 261 | // Remove `key =`. |
262 | if matches!(arg.get(1), Some(tt::TokenTree::Leaf(tt::Leaf::Punct(p))) if p.char == '=') { | 262 | if matches!(arg.get(1), Some(tt::TokenTree::Leaf(tt::Leaf::Punct(p))) if p.char == '=' && p.spacing != tt::Spacing::Joint) |
263 | { | ||
263 | arg.drain(..2); | 264 | arg.drain(..2); |
264 | } | 265 | } |
265 | } | 266 | } |