diff options
Diffstat (limited to 'crates/hir_def/src/expr.rs')
-rw-r--r-- | crates/hir_def/src/expr.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/hir_def/src/expr.rs b/crates/hir_def/src/expr.rs index af01d32dc..a293df9f1 100644 --- a/crates/hir_def/src/expr.rs +++ b/crates/hir_def/src/expr.rs | |||
@@ -99,6 +99,9 @@ pub enum Expr { | |||
99 | Return { | 99 | Return { |
100 | expr: Option<ExprId>, | 100 | expr: Option<ExprId>, |
101 | }, | 101 | }, |
102 | Yield { | ||
103 | expr: Option<ExprId>, | ||
104 | }, | ||
102 | RecordLit { | 105 | RecordLit { |
103 | path: Option<Path>, | 106 | path: Option<Path>, |
104 | fields: Vec<RecordLitField>, | 107 | fields: Vec<RecordLitField>, |
@@ -294,7 +297,7 @@ impl Expr { | |||
294 | } | 297 | } |
295 | } | 298 | } |
296 | Expr::Continue { .. } => {} | 299 | Expr::Continue { .. } => {} |
297 | Expr::Break { expr, .. } | Expr::Return { expr } => { | 300 | Expr::Break { expr, .. } | Expr::Return { expr } | Expr::Yield { expr } => { |
298 | if let Some(expr) = expr { | 301 | if let Some(expr) = expr { |
299 | f(*expr); | 302 | f(*expr); |
300 | } | 303 | } |