Rework diagnostics for wrong number of generic args

This commit is contained in:
Patryk Wychowaniec 2021-01-02 19:45:11 +01:00
parent 34628e5b53
commit d2f8e398f1
No known key found for this signature in database
GPG key ID: F62547D075E09767
121 changed files with 2787 additions and 766 deletions

View file

@ -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 }