Make expand_abstract_consts infallible

This commit is contained in:
Boxy 2022-11-24 11:09:15 +00:00 committed by kadmin
parent 4085e94ece
commit 2ac5d91d63
8 changed files with 52 additions and 105 deletions

View file

@ -664,10 +664,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
);
{
let c1 =
if let Ok(Some(a)) = tcx.expand_abstract_consts(c1) { a } else { c1 };
let c2 =
if let Ok(Some(b)) = tcx.expand_abstract_consts(c2) { b } else { c2 };
let c1 = tcx.expand_abstract_consts(c1);
let c2 = tcx.expand_abstract_consts(c2);
debug!(
"evalaute_predicate_recursively: equating consts:\nc1= {:?}\nc2= {:?}",
c1, c2