This commit is contained in:
Boxy 2022-11-15 20:45:57 +00:00 committed by kadmin
parent 8c729bd0f3
commit d75cd5c051

View File

@ -671,11 +671,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
if let (ty::ConstKind::Unevaluated(_), ty::ConstKind::Unevaluated(_)) =
(c1.kind(), c2.kind())
{
if let (Ok(Some(a)), Ok(Some(b))) = (
tcx.expand_abstract_consts(c1),
tcx.expand_abstract_consts(c2),
) && a.ty() == b.ty() && let Ok(new_obligations) =
self.infcx.at(&obligation.cause, obligation.param_env).eq(a, b)
if let Ok(Some(a)) = tcx.expand_abstract_consts(c1)
&& let Ok(Some(b)) = tcx.expand_abstract_consts(c2)
&& a.ty() == b.ty()
&& let Ok(new_obligations) = self
.infcx
.at(&obligation.cause, obligation.param_env)
.eq(a, b)
{
let mut obligations = new_obligations.obligations;
self.add_depth(