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:
Alan Egerton 2022-06-20 19:03:37 +01:00
parent 1d6010816c
commit bd604750ae
No known key found for this signature in database
GPG Key ID: 07CAC3CCA7E0643F

View File

@ -371,6 +371,13 @@ fn try_fold_const(&mut self, c: ty::Const<'tcx>) -> Result<ty::Const<'tcx>, Self
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>,