1
Fork 0

don't just compare ty::Const

This commit is contained in:
lcnr 2021-07-19 12:13:25 +02:00
parent ab9108b70f
commit 2140016d6c
3 changed files with 46 additions and 0 deletions

View file

@ -974,6 +974,10 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Region<'tcx> {
}
impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> {
fn fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self {
folder.fold_predicate(self)
}
fn super_fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self {
let new = self.inner.kind.fold_with(folder);
folder.tcx().reuse_or_mk_predicate(self, new)