X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Ftraits%2Fauto_trait.rs;h=aef2f8ff9911cc90b565bf27c02d946d0ffcd766;hb=61adaf81873101587ffff4e1b8671acbc33d3df1;hp=8e04da4f9be2479aa584270611a9607279b495d8;hpb=f95385b5d42c56a8c6cc2453a1f4b0f83f38a029;p=rust.git diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs index 8e04da4f9be..aef2f8ff991 100644 --- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs +++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs @@ -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 }