Skip to content

Commit

Permalink
Rollup merge of rust-lang#98306 - eggyal:add-unevaluated-to-blanket-f…
Browse files Browse the repository at this point in the history
…allibletypefolder, r=nnethercote

`try_fold_unevaluated` for infallible folders

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
matthiaskrgr authored Jun 21, 2022
2 parents 0de1e04 + bd60475 commit 5d3dcd1
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 5d3dcd1

Please sign in to comment.