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.rs22
1 files changed, 4 insertions, 18 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index b5e7d5db63..49551bf610 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -28,7 +28,6 @@ macro_rules! diagnostics {
}
diagnostics![
- AddReferenceHere,
BreakOutsideOfLoop,
InactiveCode,
IncorrectCase,
@@ -38,11 +37,10 @@ diagnostics![
MismatchedArgCount,
MissingFields,
MissingMatchArms,
- MissingOkOrSomeInTailExpr,
MissingUnsafe,
NoSuchField,
- RemoveThisSemicolon,
ReplaceFilterMapNextWithFindMap,
+ TypeMismatch,
UnimplementedBuiltinMacro,
UnresolvedExternCrate,
UnresolvedImport,
@@ -148,28 +146,16 @@ pub struct MismatchedArgCount {
}
#[derive(Debug)]
-pub struct RemoveThisSemicolon {
- pub expr: InFile<AstPtr<ast::Expr>>,
-}
-
-#[derive(Debug)]
-pub struct MissingOkOrSomeInTailExpr {
- pub expr: InFile<AstPtr<ast::Expr>>,
- // `Some` or `Ok` depending on whether the return type is Result or Option
- pub required: String,
- pub expected: Type,
-}
-
-#[derive(Debug)]
pub struct MissingMatchArms {
pub file: HirFileId,
pub match_expr: AstPtr<ast::Expr>,
}
#[derive(Debug)]
-pub struct AddReferenceHere {
+pub struct TypeMismatch {
pub expr: InFile<AstPtr<ast::Expr>>,
- pub mutability: Mutability,
+ pub expected: Type,
+ pub actual: Type,
}
pub use hir_ty::diagnostics::IncorrectCase;