Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
-rw-r--r--crates/hir/src/diagnostics.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index c5dc60f1ec..6c8b3088ad 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -6,7 +6,7 @@
use base_db::CrateId;
use cfg::{CfgExpr, CfgOptions};
use either::Either;
-use hir_def::path::ModPath;
+use hir_def::{path::ModPath, TraitId};
use hir_expand::{name::Name, HirFileId, InFile};
use syntax::{ast, AstPtr, SyntaxNodePtr, TextRange};
@@ -33,6 +33,7 @@ diagnostics![
BreakOutsideOfLoop,
InactiveCode,
IncorrectCase,
+ IncorrectTryExpr,
InvalidDeriveTarget,
MacroError,
MalformedDerive,
@@ -40,6 +41,7 @@ diagnostics![
MissingFields,
MissingMatchArms,
MissingUnsafe,
+ NotImplemented,
NoSuchField,
ReplaceFilterMapNextWithFindMap,
TypeMismatch,
@@ -153,6 +155,16 @@ pub struct MismatchedArgCount {
pub expected: usize,
pub found: usize,
}
+#[derive(Debug)]
+pub struct IncorrectTryExpr {
+ pub expr: InFile<AstPtr<ast::Expr>>,
+}
+#[derive(Debug)]
+pub struct NotImplemented {
+ pub expr: InFile<AstPtr<ast::Expr>>,
+ pub trait_: TraitId,
+ pub ty: Type,
+}
#[derive(Debug)]
pub struct MissingMatchArms {