about summary refs log tree commit diff
path: root/compiler/rustc_ty/src/ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ty/src/ty.rs')
-rw-r--r--compiler/rustc_ty/src/ty.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/compiler/rustc_ty/src/ty.rs b/compiler/rustc_ty/src/ty.rs
index 0f1dee7e2e0..a0235444ac4 100644
--- a/compiler/rustc_ty/src/ty.rs
+++ b/compiler/rustc_ty/src/ty.rs
@@ -18,7 +18,7 @@ fn sized_constraint_for_ty<'tcx>(
 ) -> Vec<Ty<'tcx>> {
     use ty::TyKind::*;
 
-    let result = match ty.kind {
+    let result = match ty.kind() {
         Bool | Char | Int(..) | Uint(..) | Float(..) | RawPtr(..) | Ref(..) | FnDef(..)
         | FnPtr(_) | Array(..) | Closure(..) | Generator(..) | Never => vec![],
 
@@ -344,7 +344,7 @@ fn issue33140_self_ty(tcx: TyCtxt<'_>, def_id: DefId) -> Option<Ty<'_>> {
     }
 
     let self_ty = trait_ref.self_ty();
-    let self_ty_matches = match self_ty.kind {
+    let self_ty_matches = match self_ty.kind() {
         ty::Dynamic(ref data, ty::ReStatic) => data.principal().is_none(),
         _ => false,
     };
@@ -398,21 +398,21 @@ fn associated_type_projection_predicates(
         let pred = obligation.predicate;
         match pred.skip_binders() {
             ty::PredicateAtom::Trait(tr, _) => {
-                if let ty::Projection(p) = tr.self_ty().kind {
+                if let ty::Projection(p) = *tr.self_ty().kind() {
                     if p == assoc_item_ty {
                         return Some(pred);
                     }
                 }
             }
             ty::PredicateAtom::Projection(proj) => {
-                if let ty::Projection(p) = proj.projection_ty.self_ty().kind {
+                if let ty::Projection(p) = *proj.projection_ty.self_ty().kind() {
                     if p == assoc_item_ty {
                         return Some(pred);
                     }
                 }
             }
             ty::PredicateAtom::TypeOutlives(outlives) => {
-                if let ty::Projection(p) = outlives.0.kind {
+                if let ty::Projection(p) = *outlives.0.kind() {
                     if p == assoc_item_ty {
                         return Some(pred);
                     }
@@ -449,14 +449,15 @@ fn opaque_type_projection_predicates(
         let pred = obligation.predicate;
         match pred.skip_binders() {
             ty::PredicateAtom::Trait(tr, _) => {
-                if let ty::Opaque(opaque_def_id, opaque_substs) = tr.self_ty().kind {
+                if let ty::Opaque(opaque_def_id, opaque_substs) = *tr.self_ty().kind() {
                     if opaque_def_id == def_id && opaque_substs == substs {
                         return Some(pred);
                     }
                 }
             }
             ty::PredicateAtom::Projection(proj) => {
-                if let ty::Opaque(opaque_def_id, opaque_substs) = proj.projection_ty.self_ty().kind
+                if let ty::Opaque(opaque_def_id, opaque_substs) =
+                    *proj.projection_ty.self_ty().kind()
                 {
                     if opaque_def_id == def_id && opaque_substs == substs {
                         return Some(pred);
@@ -464,7 +465,7 @@ fn opaque_type_projection_predicates(
                 }
             }
             ty::PredicateAtom::TypeOutlives(outlives) => {
-                if let ty::Opaque(opaque_def_id, opaque_substs) = outlives.0.kind {
+                if let ty::Opaque(opaque_def_id, opaque_substs) = *outlives.0.kind() {
                     if opaque_def_id == def_id && opaque_substs == substs {
                         return Some(pred);
                     }