introduce mir::Unevaluated
This commit is contained in:
@@ -128,7 +128,11 @@ pub trait TypeFolder<'tcx>: FallibleTypeFolder<'tcx, Error = !> {
|
||||
c.super_fold_with(self)
|
||||
}
|
||||
|
||||
fn fold_unevaluated(&mut self, uv: ty::Unevaluated<'tcx>) -> ty::Unevaluated<'tcx> {
|
||||
fn fold_ty_unevaluated(&mut self, uv: ty::Unevaluated<'tcx>) -> ty::Unevaluated<'tcx> {
|
||||
uv.super_fold_with(self)
|
||||
}
|
||||
|
||||
fn fold_mir_unevaluated(&mut self, uv: mir::Unevaluated<'tcx>) -> mir::Unevaluated<'tcx> {
|
||||
uv.super_fold_with(self)
|
||||
}
|
||||
|
||||
@@ -172,13 +176,20 @@ pub trait FallibleTypeFolder<'tcx>: Sized {
|
||||
c.try_super_fold_with(self)
|
||||
}
|
||||
|
||||
fn try_fold_unevaluated(
|
||||
fn try_fold_ty_unevaluated(
|
||||
&mut self,
|
||||
c: ty::Unevaluated<'tcx>,
|
||||
) -> Result<ty::Unevaluated<'tcx>, Self::Error> {
|
||||
c.try_super_fold_with(self)
|
||||
}
|
||||
|
||||
fn try_fold_mir_unevaluated(
|
||||
&mut self,
|
||||
c: mir::Unevaluated<'tcx>,
|
||||
) -> Result<mir::Unevaluated<'tcx>, Self::Error> {
|
||||
c.try_super_fold_with(self)
|
||||
}
|
||||
|
||||
fn try_fold_predicate(
|
||||
&mut self,
|
||||
p: ty::Predicate<'tcx>,
|
||||
@@ -225,11 +236,18 @@ where
|
||||
Ok(self.fold_const(c))
|
||||
}
|
||||
|
||||
fn try_fold_unevaluated(
|
||||
fn try_fold_ty_unevaluated(
|
||||
&mut self,
|
||||
c: ty::Unevaluated<'tcx>,
|
||||
) -> Result<ty::Unevaluated<'tcx>, !> {
|
||||
Ok(self.fold_unevaluated(c))
|
||||
Ok(self.fold_ty_unevaluated(c))
|
||||
}
|
||||
|
||||
fn try_fold_mir_unevaluated(
|
||||
&mut self,
|
||||
c: mir::Unevaluated<'tcx>,
|
||||
) -> Result<mir::Unevaluated<'tcx>, !> {
|
||||
Ok(self.fold_mir_unevaluated(c))
|
||||
}
|
||||
|
||||
fn try_fold_predicate(&mut self, p: ty::Predicate<'tcx>) -> Result<ty::Predicate<'tcx>, !> {
|
||||
|
||||
Reference in New Issue
Block a user