diff options
| author | Patryk Wychowaniec <pwychowaniec@pm.me> | 2021-01-02 19:45:11 +0100 |
|---|---|---|
| committer | Patryk Wychowaniec <pwychowaniec@pm.me> | 2021-01-10 13:07:40 +0100 |
| commit | d2f8e398f19b5b3d38646328ec158f50db6b8b06 (patch) | |
| tree | 2bda5bffd2730c12e6d4a0104ec720f76f17a9ae /compiler/rustc_parse/src | |
| parent | 34628e5b533d35840b61c5db0665cf7633ed3c5a (diff) | |
| download | rust-d2f8e398f19b5b3d38646328ec158f50db6b8b06.tar.gz rust-d2f8e398f19b5b3d38646328ec158f50db6b8b06.zip | |
Rework diagnostics for wrong number of generic args
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 43dee391c17..dd36122f6a1 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -230,10 +230,11 @@ impl<'a> Parser<'a> { } else { // `(T, U) -> R` let (inputs, _) = self.parse_paren_comma_seq(|p| p.parse_ty())?; + let inputs_span = lo.to(self.prev_token.span); let span = ident.span.to(self.prev_token.span); let output = self.parse_ret_ty(AllowPlus::No, RecoverQPath::No, RecoverReturnSign::No)?; - ParenthesizedArgs { inputs, output, span }.into() + ParenthesizedArgs { span, inputs, inputs_span, output }.into() }; PathSegment { ident, args, id: ast::DUMMY_NODE_ID } |
