introduce ty::Value
Co-authored-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
This commit is contained in:
parent
5a45ab9738
commit
10fc0b159e
44 changed files with 214 additions and 205 deletions
|
@ -345,7 +345,7 @@ where
|
|||
Const::Ty(_, ct)
|
||||
if matches!(
|
||||
ct.kind(),
|
||||
ty::ConstKind::Param(_) | ty::ConstKind::Error(_) | ty::ConstKind::Value(_, _)
|
||||
ty::ConstKind::Param(_) | ty::ConstKind::Error(_) | ty::ConstKind::Value(_)
|
||||
) =>
|
||||
{
|
||||
None
|
||||
|
|
|
@ -46,8 +46,13 @@ pub fn provide(providers: &mut Providers) {
|
|||
};
|
||||
providers.hooks.try_destructure_mir_constant_for_user_output =
|
||||
const_eval::try_destructure_mir_constant_for_user_output;
|
||||
providers.valtree_to_const_val = |tcx, (ty, valtree)| {
|
||||
const_eval::valtree_to_const_value(tcx, ty::TypingEnv::fully_monomorphized(), ty, valtree)
|
||||
providers.valtree_to_const_val = |tcx, cv| {
|
||||
const_eval::valtree_to_const_value(
|
||||
tcx,
|
||||
ty::TypingEnv::fully_monomorphized(),
|
||||
cv.ty,
|
||||
cv.valtree,
|
||||
)
|
||||
};
|
||||
providers.check_validity_requirement = |tcx, (init_kind, param_env_and_ty)| {
|
||||
util::check_validity_requirement(tcx, init_kind, param_env_and_ty)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue