about summary refs log tree commit diff
path: root/src/librustc_passes
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-09-16 19:08:35 +0100
committervarkor <github@varkor.com>2019-09-25 15:50:04 +0100
commite2e0f9af85cbe9c79a04b963df9e87c719339e0e (patch)
tree75484ba6c60ece54d7950a7011d7e9e0edcaad67 /src/librustc_passes
parent2808a46a497959f00fcca87d7874118616356a18 (diff)
downloadrust-e2e0f9af85cbe9c79a04b963df9e87c719339e0e.tar.gz
rust-e2e0f9af85cbe9c79a04b963df9e87c719339e0e.zip
Rename `sty` to `kind`
Diffstat (limited to 'src/librustc_passes')
-rw-r--r--src/librustc_passes/rvalue_promotion.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_passes/rvalue_promotion.rs b/src/librustc_passes/rvalue_promotion.rs
index f2461f70161..38b4fa354c1 100644
--- a/src/librustc_passes/rvalue_promotion.rs
+++ b/src/librustc_passes/rvalue_promotion.rs
@@ -273,7 +273,7 @@ fn check_expr_kind<'a, 'tcx>(
     v: &mut CheckCrateVisitor<'a, 'tcx>,
     e: &'tcx hir::Expr, node_ty: Ty<'tcx>) -> Promotability {
 
-    let ty_result = match node_ty.sty {
+    let ty_result = match node_ty.kind {
         ty::Adt(def, _) if def.has_dtor(v.tcx) => {
             NotPromotable
         }
@@ -298,7 +298,7 @@ fn check_expr_kind<'a, 'tcx>(
             if v.tables.is_method_call(e) {
                 return NotPromotable;
             }
-            match v.tables.node_type(lhs.hir_id).sty {
+            match v.tables.node_type(lhs.hir_id).kind {
                 ty::RawPtr(_) | ty::FnPtr(..) => {
                     assert!(op.node == hir::BinOpKind::Eq || op.node == hir::BinOpKind::Ne ||
                             op.node == hir::BinOpKind::Le || op.node == hir::BinOpKind::Lt ||
@@ -427,7 +427,7 @@ fn check_expr_kind<'a, 'tcx>(
             if let Some(ref expr) = *option_expr {
                 struct_result &= v.check_expr(&expr);
             }
-            if let ty::Adt(adt, ..) = v.tables.expr_ty(e).sty {
+            if let ty::Adt(adt, ..) = v.tables.expr_ty(e).kind {
                 // unsafe_cell_type doesn't necessarily exist with no_core
                 if Some(adt.did) == v.tcx.lang_items().unsafe_cell_type() {
                     return NotPromotable;