Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/eval.rs')
-rw-r--r--crates/hir-ty/src/mir/eval.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-ty/src/mir/eval.rs b/crates/hir-ty/src/mir/eval.rs
index c013e78d81..505db1776f 100644
--- a/crates/hir-ty/src/mir/eval.rs
+++ b/crates/hir-ty/src/mir/eval.rs
@@ -900,7 +900,7 @@ impl<'db> Evaluator<'db> {
OperandKind::Constant { konst: _, ty } => ty.as_ref(),
&OperandKind::Static(s) => {
let ty = InferenceResult::of(self.db, DefWithBodyId::from(s))
- .expr_ty(Body::of(self.db, s.into()).body_expr);
+ .expr_ty(Body::of(self.db, s.into()).root_expr());
Ty::new_ref(
self.interner(),
Region::new_static(self.interner()),
@@ -2835,7 +2835,7 @@ impl<'db> Evaluator<'db> {
self.allocate_const_in_heap(locals, konst)?
} else {
let ty = InferenceResult::of(self.db, DefWithBodyId::from(st))
- .expr_ty(Body::of(self.db, st.into()).body_expr);
+ .expr_ty(Body::of(self.db, st.into()).root_expr());
let Some((size, align)) = self.size_align_of(ty, locals)? else {
not_supported!("unsized extern static");
};