Change ty.kind to a method

This commit is contained in:
LeSeulArtichaut 2020-08-03 00:49:11 +02:00
parent ef55a0a92f
commit 3e14b684dd
189 changed files with 947 additions and 899 deletions

View file

@ -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,
}