mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Diagnose mismatched arg count for tuple struct patterns
This commit is contained in:
parent
297ed70a23
commit
8654a098c7
7 changed files with 144 additions and 20 deletions
|
@ -43,6 +43,7 @@ diagnostics![
|
|||
MacroExpansionParseError,
|
||||
MalformedDerive,
|
||||
MismatchedArgCount,
|
||||
MismatchedTupleStructPatArgCount,
|
||||
MissingFields,
|
||||
MissingMatchArms,
|
||||
MissingUnsafe,
|
||||
|
@ -182,6 +183,13 @@ pub struct PrivateAssocItem {
|
|||
pub item: AssocItem,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MismatchedTupleStructPatArgCount {
|
||||
pub expr_or_pat: InFile<Either<AstPtr<ast::Expr>, AstPtr<ast::Pat>>>,
|
||||
pub expected: usize,
|
||||
pub found: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ExpectedFunction {
|
||||
pub call: InFile<AstPtr<ast::Expr>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue