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.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs index 5edc16d8bc..6c8b3088ad 100644 --- a/crates/hir/src/diagnostics.rs +++ b/crates/hir/src/diagnostics.rs @@ -1,12 +1,12 @@ //! Re-export diagnostics such that clients of `hir` don't have to depend on //! low-level crates. //! -//! This probably isn't the best way to do this -- ideally, diagnistics should +//! This probably isn't the best way to do this -- ideally, diagnostics should //! be expressed in terms of hir types themselves. 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 { |