Rework diagnostics for wrong number of generic args
This commit is contained in:
parent
34628e5b53
commit
d2f8e398f1
121 changed files with 2787 additions and 766 deletions
|
@ -242,12 +242,21 @@ impl Into<Option<P<GenericArgs>>> for ParenthesizedArgs {
|
|||
/// A path like `Foo(A, B) -> C`.
|
||||
#[derive(Clone, Encodable, Decodable, Debug)]
|
||||
pub struct ParenthesizedArgs {
|
||||
/// Overall span
|
||||
/// ```text
|
||||
/// Foo(A, B) -> C
|
||||
/// ^^^^^^^^^^^^^^
|
||||
/// ```
|
||||
pub span: Span,
|
||||
|
||||
/// `(A, B)`
|
||||
pub inputs: Vec<P<Ty>>,
|
||||
|
||||
/// ```text
|
||||
/// Foo(A, B) -> C
|
||||
/// ^^^^^^
|
||||
/// ```
|
||||
pub inputs_span: Span,
|
||||
|
||||
/// `C`
|
||||
pub output: FnRetTy,
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#![feature(const_fn_transmute)]
|
||||
#![feature(const_panic)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(iterator_fold_self)]
|
||||
#![feature(label_break_value)]
|
||||
#![feature(nll)]
|
||||
#![feature(or_patterns)]
|
||||
|
|
|
@ -565,7 +565,7 @@ pub fn noop_visit_parenthesized_parameter_data<T: MutVisitor>(
|
|||
args: &mut ParenthesizedArgs,
|
||||
vis: &mut T,
|
||||
) {
|
||||
let ParenthesizedArgs { inputs, output, span } = args;
|
||||
let ParenthesizedArgs { inputs, output, span, .. } = args;
|
||||
visit_vec(inputs, |input| vis.visit_ty(input));
|
||||
noop_visit_fn_ret_ty(output, vis);
|
||||
vis.visit_span(span);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue