We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1b96b1 commit b7c4435Copy full SHA for b7c4435
crates/hir-def/src/body/lower.rs
@@ -973,10 +973,10 @@ impl ExprCollector<'_> {
973
block: ast::BlockExpr,
974
mk_block: impl FnOnce(Option<BlockId>, Box<[Statement]>, Option<ExprId>) -> Expr,
975
) -> ExprId {
976
- let file_local_id = self.ast_id_map.ast_id(&block);
977
- let ast_id = AstId::new(self.expander.current_file_id, file_local_id);
978
-
979
- let block_id = if ItemTree::block_has_items(self.db, ast_id.file_id, &block) {
+ let block_id = if ItemTree::block_has_items(self.db, self.expander.current_file_id, &block)
+ {
+ let file_local_id = self.ast_id_map.ast_id(&block);
+ let ast_id = AstId::new(self.expander.current_file_id, file_local_id);
980
Some(self.db.intern_block(BlockLoc {
981
ast_id,
982
module: self.expander.def_map.module_id(self.expander.module),
0 commit comments