1
Fork 0

Add a query for dereferencing constants of reference type

This commit is contained in:
Oliver Scherer 2020-07-01 11:41:38 +02:00
parent b54f122a1c
commit 34c62e0abc
3 changed files with 53 additions and 1 deletions

View file

@ -60,4 +60,8 @@ pub fn provide(providers: &mut Providers) {
let (param_env, value) = param_env_and_value.into_parts();
const_eval::destructure_const(tcx, param_env, value)
};
providers.deref_const = |tcx, param_env_and_value| {
let (param_env, value) = param_env_and_value.into_parts();
const_eval::deref_const(tcx, param_env, value)
};
}