mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Diagnose call expression on non-callable things
This commit is contained in:
parent
3ba876a4a6
commit
3c7a0aa00e
6 changed files with 83 additions and 14 deletions
|
@ -31,6 +31,7 @@ macro_rules! diagnostics {
|
|||
|
||||
diagnostics![
|
||||
BreakOutsideOfLoop,
|
||||
ExpectedFunction,
|
||||
InactiveCode,
|
||||
IncorrectCase,
|
||||
InvalidDeriveTarget,
|
||||
|
@ -130,6 +131,12 @@ pub struct PrivateAssocItem {
|
|||
pub item: AssocItem,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ExpectedFunction {
|
||||
pub call: InFile<AstPtr<ast::Expr>>,
|
||||
pub found: Type,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct PrivateField {
|
||||
pub expr: InFile<AstPtr<ast::Expr>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue