Update compiler/rustc_middle/src/ty/fold.rs

Co-authored-by: lcnr <rust@lcnr.de>
This commit is contained in:
eggyal 2021-12-01 12:48:49 +00:00 committed by Alan Egerton
parent bfc434b6d0
commit d79e17daf0
No known key found for this signature in database
GPG Key ID: 07CAC3CCA7E0643F

View File

@ -62,10 +62,12 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
fn fold_with<F: TypeFolder<'tcx, Error = !>>(self, folder: &mut F) -> Self {
self.try_fold_with(folder).into_ok()
}
fn try_super_fold_with<F: TypeFolderFallible<'tcx>>(
self,
folder: &mut F,
) -> Result<Self, F::Error>;
fn try_fold_with<F: TypeFolderFallible<'tcx>>(self, folder: &mut F) -> Result<Self, F::Error> {
self.try_super_fold_with(folder)
}