Auto merge of #72754 - lcnr:predicate-fold, r=nikomatsakis
remove trivial `mk_predicate`s r? @nikomatsakis
This commit is contained in:
commit
f3fadf6abd
@ -987,7 +987,8 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Region<'tcx> {
|
||||
|
||||
impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> {
|
||||
fn super_fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> Self {
|
||||
folder.tcx().mk_predicate(ty::PredicateKind::super_fold_with(self.kind, folder))
|
||||
let new = ty::PredicateKind::super_fold_with(self.kind, folder);
|
||||
if new != *self.kind { folder.tcx().mk_predicate(new) } else { *self }
|
||||
}
|
||||
|
||||
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user