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.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/hir-ty/src/mir/eval.rs b/crates/hir-ty/src/mir/eval.rs
index 08f42410a7..da15ca695e 100644
--- a/crates/hir-ty/src/mir/eval.rs
+++ b/crates/hir-ty/src/mir/eval.rs
@@ -42,8 +42,8 @@ use crate::{
layout::{Layout, LayoutError, RustcEnumVariantIdx},
method_resolution::{is_dyn_method, lookup_impl_const},
next_solver::{
- Const, ConstBytes, ConstKind, DbInterner, ErrorGuaranteed, GenericArgs, Region,
- SolverDefId, Ty, TyKind, TypingMode, UnevaluatedConst, ValueConst,
+ Const, ConstBytes, ConstKind, DbInterner, ErrorGuaranteed, GenericArgs, Region, Ty, TyKind,
+ TypingMode, UnevaluatedConst, ValueConst,
infer::{DbInternerInferExt, InferCtxt, traits::ObligationCause},
obligation_ctxt::ObligationCtxt,
},
@@ -1917,11 +1917,7 @@ impl<'db> Evaluator<'db> {
let value = match konst.kind() {
ConstKind::Value(value) => value,
ConstKind::Unevaluated(UnevaluatedConst { def: const_id, args: subst }) => 'b: {
- let mut id = match const_id {
- SolverDefId::ConstId(it) => GeneralConstId::from(it),
- SolverDefId::StaticId(it) => it.into(),
- _ => unreachable!("unevaluated consts should be consts or statics"),
- };
+ let mut id = const_id.0;
let mut subst = subst;
if let hir_def::GeneralConstId::ConstId(c) = id {
let (c, s) = lookup_impl_const(&self.infcx, self.trait_env.clone(), c, subst);