Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/hir.rs')
-rw-r--r--crates/hir-def/src/hir.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir-def/src/hir.rs b/crates/hir-def/src/hir.rs
index f008ae761a..bbe62f27b9 100644
--- a/crates/hir-def/src/hir.rs
+++ b/crates/hir-def/src/hir.rs
@@ -352,6 +352,9 @@ pub enum Statement {
expr: ExprId,
has_semi: bool,
},
+ // At the moment, we only use this to figure out if a return expression
+ // is really the last statement of a block. See #16566
+ Item,
}
impl Expr {
@@ -385,6 +388,7 @@ impl Expr {
}
}
Statement::Expr { expr: expression, .. } => f(*expression),
+ Statement::Item => (),
}
}
if let &Some(expr) = tail {