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.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index b34c7b20c3..d56d4b7431 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -104,6 +104,7 @@ diagnostics![AnyDiagnostic<'db> ->
BreakOutsideOfLoop,
CastToUnsized<'db>,
ExpectedFunction<'db>,
+ FunctionalRecordUpdateOnNonStruct,
GenericDefaultRefersToSelf,
InactiveCode,
IncoherentImpl,
@@ -302,6 +303,11 @@ pub struct ExpectedFunction<'db> {
}
#[derive(Debug)]
+pub struct FunctionalRecordUpdateOnNonStruct {
+ pub base_expr: InFile<ExprOrPatPtr>,
+}
+
+#[derive(Debug)]
pub struct UnresolvedField<'db> {
pub expr: InFile<ExprOrPatPtr>,
pub receiver: Type<'db>,
@@ -855,6 +861,9 @@ impl<'db> AnyDiagnostic<'db> {
&InferenceDiagnostic::NonExhaustiveRecordExpr { expr } => {
NonExhaustiveRecordExpr { expr: expr_syntax(expr)? }.into()
}
+ &InferenceDiagnostic::FunctionalRecordUpdateOnNonStruct { base_expr } => {
+ FunctionalRecordUpdateOnNonStruct { base_expr: expr_syntax(base_expr)? }.into()
+ }
InferenceDiagnostic::TypedHole { expr, expected } => {
let expr = expr_syntax(*expr)?;
TypedHole { expr, expected: Type::new(db, def, expected.as_ref()) }.into()