about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2019-09-28 07:20:06 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2019-09-28 07:20:12 -0700
commit0bf1a80b322f285efb9ea45b62e7dc764ebe1954 (patch)
tree9cc2c67335655954e412f30ead431ba8b0f32432
parentff4158abf2a66a6a3f246fef8178e179201fcae0 (diff)
downloadrust-0bf1a80b322f285efb9ea45b62e7dc764ebe1954.tar.gz
rust-0bf1a80b322f285efb9ea45b62e7dc764ebe1954.zip
Rename `sty` to `kind`
Picks up changes made in #64513
-rw-r--r--src/librustc_mir/transform/check_consts/qualifs.rs4
-rw-r--r--src/librustc_mir/transform/check_consts/validation.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_mir/transform/check_consts/qualifs.rs b/src/librustc_mir/transform/check_consts/qualifs.rs
index dd2ea914402..d9d0ce18555 100644
--- a/src/librustc_mir/transform/check_consts/qualifs.rs
+++ b/src/librustc_mir/transform/check_consts/qualifs.rs
@@ -164,7 +164,7 @@ pub trait Qualif {
                 if let box [proj_base @ .., elem] = &place.projection {
                     if ProjectionElem::Deref == *elem {
                         let base_ty = Place::ty_from(&place.base, proj_base, cx.body, cx.tcx).ty;
-                        if let ty::Ref(..) = base_ty.sty {
+                        if let ty::Ref(..) = base_ty.kind {
                             return Self::in_place(cx, per_local, PlaceRef {
                                 base: &place.base,
                                 projection: proj_base,
@@ -223,7 +223,7 @@ impl Qualif for HasMutInterior {
                 if let BorrowKind::Mut { .. } = kind {
                     // In theory, any zero-sized value could be borrowed
                     // mutably without consequences.
-                    match ty.sty {
+                    match ty.kind {
                         // Inside a `static mut`, &mut [...] is also allowed.
                         ty::Array(..) | ty::Slice(_) if cx.mode == Mode::StaticMut => {},
 
diff --git a/src/librustc_mir/transform/check_consts/validation.rs b/src/librustc_mir/transform/check_consts/validation.rs
index 11a93225d36..7e876dd1d99 100644
--- a/src/librustc_mir/transform/check_consts/validation.rs
+++ b/src/librustc_mir/transform/check_consts/validation.rs
@@ -247,7 +247,7 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
             if let box [proj_base @ .., elem] = &place.projection {
                 if *elem == ProjectionElem::Deref {
                     let base_ty = Place::ty_from(&place.base, proj_base, self.body, self.tcx).ty;
-                    if let ty::Ref(..) = base_ty.sty {
+                    if let ty::Ref(..) = base_ty.kind {
                         reborrow_place = Some(proj_base);
                     }
                 }
@@ -302,7 +302,7 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
             }
 
             Rvalue::BinaryOp(op, ref lhs, _) => {
-                if let ty::RawPtr(_) | ty::FnPtr(..) = lhs.ty(self.body, self.tcx).sty {
+                if let ty::RawPtr(_) | ty::FnPtr(..) = lhs.ty(self.body, self.tcx).kind {
                     assert!(op == BinOp::Eq || op == BinOp::Ne ||
                             op == BinOp::Le || op == BinOp::Lt ||
                             op == BinOp::Ge || op == BinOp::Gt ||
@@ -431,7 +431,7 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
                 }
 
                 let base_ty = Place::ty_from(place_base, proj_base, self.body, self.tcx).ty;
-                if let ty::RawPtr(_) = base_ty.sty {
+                if let ty::RawPtr(_) = base_ty.kind {
                     self.check_op(ops::RawPtrDeref);
                 }
             }
@@ -508,7 +508,7 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
             TerminatorKind::Call { func, .. } => {
                 let fn_ty = func.ty(self.body, self.tcx);
 
-                let def_id = match fn_ty.sty {
+                let def_id = match fn_ty.kind {
                     ty::FnDef(def_id, _) => def_id,
 
                     ty::FnPtr(_) => {