Rollup merge of #98306 - eggyal:add-unevaluated-to-blanket-fallibletypefolder, r=nnethercote

`try_fold_unevaluated` for infallible folders

#97447 added folding of unevaluated constants, but did not include an override of the default (fallible) operation in the blanket impl of `FallibleTypeFolder` for infallible folders.  Here we provide that missing override.

r? ```@nnethercote```
This commit is contained in:
Yuki Okushi 2022-06-21 20:08:13 +09:00 committed by GitHub
commit 51a60911fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -371,6 +371,13 @@ where
Ok(self.fold_const(c))
}
fn try_fold_unevaluated(
&mut self,
c: ty::Unevaluated<'tcx>,
) -> Result<ty::Unevaluated<'tcx>, Self::Error> {
Ok(self.fold_unevaluated(c))
}
fn try_fold_predicate(
&mut self,
p: ty::Predicate<'tcx>,