diff options
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/auto_trait.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/auto_trait.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs index fa3d0241998..ad8e9d9faa6 100644 --- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs +++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs @@ -598,7 +598,7 @@ impl AutoTraitFinder<'tcx> { } pub fn is_of_param(&self, ty: Ty<'_>) -> bool { - match ty.kind { + match ty.kind() { ty::Param(_) => true, ty::Projection(p) => self.is_of_param(p.self_ty()), _ => false, @@ -606,7 +606,7 @@ impl AutoTraitFinder<'tcx> { } fn is_self_referential_projection(&self, p: ty::PolyProjectionPredicate<'_>) -> bool { - match p.ty().skip_binder().kind { + match *p.ty().skip_binder().kind() { ty::Projection(proj) if proj == p.skip_binder().projection_ty => true, _ => false, } |
