Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/next_solver/solver.rs')
-rw-r--r--crates/hir-ty/src/next_solver/solver.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/hir-ty/src/next_solver/solver.rs b/crates/hir-ty/src/next_solver/solver.rs
index 5e7e03e0b2..ecfc1c21b7 100644
--- a/crates/hir-ty/src/next_solver/solver.rs
+++ b/crates/hir-ty/src/next_solver/solver.rs
@@ -261,11 +261,10 @@ impl<'db> SolverDelegate for SolverContext<'db> {
self.cx().db.const_eval(c, subst, None).ok()?
}
GeneralConstId::StaticId(c) => self.cx().db.const_eval_static(c).ok()?,
- // TODO: Wire up const_eval_anon query in Phase 5.
- // For now, return an error const so normalization resolves the
- // unevaluated const to Error (matching the old behavior where
- // complex expressions produced ConstKind::Error directly).
- GeneralConstId::AnonConstId(_) => return Some(Const::error(self.cx())),
+ GeneralConstId::AnonConstId(c) => {
+ let subst = uv.args;
+ self.cx().db.anon_const_eval(c, subst, None).ok()?
+ }
};
Some(Const::new_from_allocation(
self.interner,