fmt
This commit is contained in:
parent
8c729bd0f3
commit
d75cd5c051
1 changed files with 18 additions and 16 deletions
|
@ -671,22 +671,24 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
if let (ty::ConstKind::Unevaluated(_), ty::ConstKind::Unevaluated(_)) =
|
if let (ty::ConstKind::Unevaluated(_), ty::ConstKind::Unevaluated(_)) =
|
||||||
(c1.kind(), c2.kind())
|
(c1.kind(), c2.kind())
|
||||||
{
|
{
|
||||||
if let (Ok(Some(a)), Ok(Some(b))) = (
|
if let Ok(Some(a)) = tcx.expand_abstract_consts(c1)
|
||||||
tcx.expand_abstract_consts(c1),
|
&& let Ok(Some(b)) = tcx.expand_abstract_consts(c2)
|
||||||
tcx.expand_abstract_consts(c2),
|
&& a.ty() == b.ty()
|
||||||
) && a.ty() == b.ty() && let Ok(new_obligations) =
|
&& let Ok(new_obligations) = self
|
||||||
self.infcx.at(&obligation.cause, obligation.param_env).eq(a, b)
|
.infcx
|
||||||
{
|
.at(&obligation.cause, obligation.param_env)
|
||||||
let mut obligations = new_obligations.obligations;
|
.eq(a, b)
|
||||||
self.add_depth(
|
{
|
||||||
obligations.iter_mut(),
|
let mut obligations = new_obligations.obligations;
|
||||||
obligation.recursion_depth,
|
self.add_depth(
|
||||||
);
|
obligations.iter_mut(),
|
||||||
return self.evaluate_predicates_recursively(
|
obligation.recursion_depth,
|
||||||
previous_stack,
|
);
|
||||||
obligations.into_iter(),
|
return self.evaluate_predicates_recursively(
|
||||||
);
|
previous_stack,
|
||||||
}
|
obligations.into_iter(),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let evaluate = |c: ty::Const<'tcx>| {
|
let evaluate = |c: ty::Const<'tcx>| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue