try to evaluate in try_unify

This commit is contained in:
b-naber 2022-03-17 11:44:57 +01:00
parent d8e564715e
commit 47f78a2487
4 changed files with 68 additions and 37 deletions

View file

@ -691,11 +691,12 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
&self,
a: ty::Unevaluated<'tcx, ()>,
b: ty::Unevaluated<'tcx, ()>,
param_env: ty::ParamEnv<'tcx>,
) -> bool {
let canonical = self.canonicalize_query((a, b), &mut OriginalQueryValues::default());
debug!("canonical consts: {:?}", &canonical.value);
self.tcx.try_unify_abstract_consts(canonical.value)
self.tcx.try_unify_abstract_consts(param_env.and(canonical.value))
}
pub fn is_in_snapshot(&self) -> bool {