Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr_store/lower.rs')
-rw-r--r--crates/hir-def/src/expr_store/lower.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-def/src/expr_store/lower.rs b/crates/hir-def/src/expr_store/lower.rs
index 0320f6b93b..fd5b25ca2f 100644
--- a/crates/hir-def/src/expr_store/lower.rs
+++ b/crates/hir-def/src/expr_store/lower.rs
@@ -1310,10 +1310,10 @@ impl<'db> ExprCollector<'db> {
/// Returns `None` if and only if the expression is `#[cfg]`d out.
fn maybe_collect_expr(&mut self, expr: ast::Expr) -> Option<ExprId> {
- let syntax_ptr = AstPtr::new(&expr);
if !self.check_cfg(&expr) {
return None;
}
+ let syntax_ptr = AstPtr::new(&expr);
// FIXME: Move some of these arms out into separate methods for clarity
Some(match expr {
@@ -1589,7 +1589,7 @@ impl<'db> ExprCollector<'db> {
};
Expr::RecordLit { path, fields, spread }
} else {
- Expr::RecordLit { path, fields: Box::default(), spread: RecordSpread::None }
+ Expr::RecordLit { path, fields: ThinVec::default(), spread: RecordSpread::None }
};
self.alloc_expr(record_lit, syntax_ptr)