1
Fork 0

Name the destructure_mir_constant query appropriately

This commit is contained in:
Oli Scherer 2023-07-05 15:51:52 +00:00
parent 46cce98134
commit 8ac1a67d11
4 changed files with 6 additions and 6 deletions

View file

@ -85,7 +85,7 @@ pub(crate) fn eval_to_valtree<'tcx>(
}
#[instrument(skip(tcx), level = "debug")]
pub(crate) fn try_destructure_mir_constant<'tcx>(
pub(crate) fn try_destructure_mir_constant_for_diagnostics<'tcx>(
tcx: TyCtxt<'tcx>,
val: ConstValue<'tcx>,
ty: Ty<'tcx>,

View file

@ -52,8 +52,8 @@ pub fn provide(providers: &mut Providers) {
let (param_env, raw) = param_env_and_value.into_parts();
const_eval::eval_to_valtree(tcx, param_env, raw)
};
providers.try_destructure_mir_constant =
|tcx, (cv, ty)| const_eval::try_destructure_mir_constant(tcx, cv, ty);
providers.try_destructure_mir_constant_for_diagnostics =
|tcx, (cv, ty)| const_eval::try_destructure_mir_constant_for_diagnostics(tcx, cv, ty);
providers.valtree_to_const_val = |tcx, (ty, valtree)| {
const_eval::valtree_to_const_value(tcx, ty::ParamEnv::empty().and(ty), valtree)
};