Auto merge of #102056 - b-naber:unevaluated, r=lcnr
Introduce mir::Unevaluated Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that. r? `@lcnr`
This commit is contained in:
commit
9a963e3bad
38 changed files with 220 additions and 156 deletions
|
@ -2141,7 +2141,7 @@ fn confirm_impl_candidate<'cx, 'tcx>(
|
|||
let identity_substs =
|
||||
crate::traits::InternalSubsts::identity_for_item(tcx, assoc_ty.item.def_id);
|
||||
let did = ty::WithOptConstParam::unknown(assoc_ty.item.def_id);
|
||||
let kind = ty::ConstKind::Unevaluated(ty::Unevaluated::new(did, identity_substs));
|
||||
let kind = ty::ConstKind::Unevaluated(ty::UnevaluatedConst::new(did, identity_substs));
|
||||
ty.map_bound(|ty| tcx.mk_const(ty::ConstS { ty, kind }).into())
|
||||
} else {
|
||||
ty.map_bound(|ty| ty.into())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue