1
Fork 0

Opaques do not constrain generic params

This commit is contained in:
Michael Goulet 2023-08-11 19:05:03 +00:00
parent f1b854818d
commit d0c826cfc2
7 changed files with 51 additions and 13 deletions

View file

@ -59,7 +59,7 @@ struct ParameterCollector {
impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ParameterCollector {
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
match *t.kind() {
ty::Alias(ty::Projection | ty::Inherent, ..) if !self.include_nonconstraining => {
ty::Alias(..) if !self.include_nonconstraining => {
// projections are not injective
return ControlFlow::Continue(());
}