Skip to content

Commit

Permalink
try_fold_unevaluated for infallible folders
Browse files Browse the repository at this point in the history
rust-lang#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
  • Loading branch information
eggyal committed Jun 20, 2022
1 parent 1d60108 commit bd60475
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/rustc_middle/src/ty/fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit bd60475

Please sign in to comment.