Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/expr.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/expr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-ty/src/infer/expr.rs b/crates/hir-ty/src/infer/expr.rs index c57d41cc5f..9f2d9d25b9 100644 --- a/crates/hir-ty/src/infer/expr.rs +++ b/crates/hir-ty/src/infer/expr.rs @@ -8,7 +8,7 @@ use hir_def::{ expr_store::path::{GenericArgs as HirGenericArgs, Path}, hir::{ Array, AsmOperand, AsmOptions, BinaryOp, BindingAnnotation, Expr, ExprId, ExprOrPatId, - InlineAsmKind, LabelId, Literal, Pat, PatId, Statement, UnaryOp, + InlineAsmKind, LabelId, Literal, Pat, PatId, RecordSpread, Statement, UnaryOp, }, resolver::ValueNs, }; @@ -657,8 +657,8 @@ impl<'db> InferenceContext<'_, 'db> { } } } - if let Some(expr) = spread { - self.infer_expr(*expr, &Expectation::has_type(ty), ExprIsRead::Yes); + if let RecordSpread::Expr(expr) = *spread { + self.infer_expr(expr, &Expectation::has_type(ty), ExprIsRead::Yes); } ty } |