]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/auto_trait.rs
Combine projection and opaque into alias
[rust.git] / compiler / rustc_trait_selection / src / traits / auto_trait.rs
index 8e04da4f9be2479aa584270611a9607279b495d8..aef2f8ff9911cc90b565bf27c02d946d0ffcd766 100644 (file)
@@ -579,14 +579,14 @@ fn is_param_no_infer(&self, substs: SubstsRef<'_>) -> bool {
     pub fn is_of_param(&self, ty: Ty<'_>) -> bool {
         match ty.kind() {
             ty::Param(_) => true,
-            ty::Projection(p) => self.is_of_param(p.self_ty()),
+            ty::Alias(ty::Projection, p) => self.is_of_param(p.self_ty()),
             _ => false,
         }
     }
 
     fn is_self_referential_projection(&self, p: ty::PolyProjectionPredicate<'_>) -> bool {
         if let Some(ty) = p.term().skip_binder().ty() {
-            matches!(ty.kind(), ty::Projection(proj) if proj == &p.skip_binder().projection_ty)
+            matches!(ty.kind(), ty::Alias(ty::Projection, proj) if proj == &p.skip_binder().projection_ty)
         } else {
             false
         }