about summary refs log tree commit diff
path: root/compiler/rustc_parse
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-08-13 21:06:46 -0700
committerGitHub <noreply@github.com>2022-08-13 21:06:46 -0700
commit2af344595a40e0ed57c8befa513fe34556281899 (patch)
tree2699bf38cf20f9122e29edc6aa76d0c8e3e1af8e /compiler/rustc_parse
parentb76fec3ca89ba255316c010065f1fcf4d7cbfc9c (diff)
parentc6089189b3045648a8b37ee65dfc2e7e139789b0 (diff)
downloadrust-2af344595a40e0ed57c8befa513fe34556281899.tar.gz
rust-2af344595a40e0ed57c8befa513fe34556281899.zip
Rollup merge of #99646 - compiler-errors:arg-mismatch-single-arg-label, r=estebank
Only point out a single function parameter if we have a single arg incompatibility

Fixes #99635
Diffstat (limited to 'compiler/rustc_parse')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 2880ef78c8d..33bebfc2c9a 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -2268,7 +2268,7 @@ impl<'a> Parser<'a> {
                     attrs: attrs.into(),
                     ty,
                     pat,
-                    span: lo.to(this.token.span),
+                    span: lo.to(this.prev_token.span),
                     id: DUMMY_NODE_ID,
                     is_placeholder: false,
                 },