1
Fork 0

Expect clause more

This commit is contained in:
Michael Goulet 2023-06-19 20:48:46 +00:00
parent 46a650f4e0
commit 2fa796a3c7
4 changed files with 7 additions and 10 deletions

View file

@ -666,10 +666,7 @@ impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ty::Clause<'tcx> {
self,
folder: &mut F,
) -> Result<Self, F::Error> {
Ok(folder
.try_fold_predicate(self.as_predicate())?
.as_clause()
.expect("no sensible folder would do this"))
Ok(folder.try_fold_predicate(self.as_predicate())?.expect_clause())
}
}