X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_privacy%2Fsrc%2Flib.rs;h=66767e2b81fdcaa7059531940de9b296c9748e50;hb=f396888c4d816f7d0980aba041014169dd71a2a7;hp=73873c8cf0d914f29f7e9d005fb91915b342aae9;hpb=e7529d6a3867ed1692818702b40814ee992eba2d;p=rust.git diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index 73873c8cf0d..66767e2b81f 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -128,10 +128,7 @@ fn visit_predicate(&mut self, predicate: ty::Predicate<'tcx>) -> ControlFlow self.visit_trait(trait_ref), ty::PredicateKind::Projection(ty::ProjectionPredicate { projection_ty, term }) => { - match term { - ty::Term::Ty(ty) => ty.visit_with(self)?, - ty::Term::Const(ct) => ct.visit_with(self)?, - } + term.visit_with(self)?; self.visit_projection_ty(projection_ty) } ty::PredicateKind::TypeOutlives(ty::OutlivesPredicate(ty, _region)) => { @@ -1189,10 +1186,7 @@ fn visit_trait_ref(&mut self, trait_ref: &'tcx hir::TraitRef<'tcx>) { for (poly_predicate, _) in bounds.projection_bounds { let pred = poly_predicate.skip_binder(); - let poly_pred_term = match pred.term { - ty::Term::Ty(ty) => self.visit(ty), - ty::Term::Const(ct) => self.visit(ct), - }; + let poly_pred_term = self.visit(pred.term); if poly_pred_term.is_break() || self.visit_projection_ty(pred.projection_ty).is_break() {