diff options
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index f2fc69b2f..9bf3b51b0 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -367,6 +367,13 @@ impl<'a> InferenceContext<'a> { | |||
367 | } | 367 | } |
368 | Ty::simple(TypeCtor::Never) | 368 | Ty::simple(TypeCtor::Never) |
369 | } | 369 | } |
370 | Expr::Yield { expr } => { | ||
371 | // FIXME: track yield type for coercion | ||
372 | if let Some(expr) = expr { | ||
373 | self.infer_expr(*expr, &Expectation::none()); | ||
374 | } | ||
375 | Ty::simple(TypeCtor::Never) | ||
376 | } | ||
370 | Expr::RecordLit { path, fields, spread } => { | 377 | Expr::RecordLit { path, fields, spread } => { |
371 | let (ty, def_id) = self.resolve_variant(path.as_ref()); | 378 | let (ty, def_id) = self.resolve_variant(path.as_ref()); |
372 | if let Some(variant) = def_id { | 379 | if let Some(variant) = def_id { |