]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_traits/lowering/environment.rs
Rename `Item.node` to `Item.kind`
[rust.git] / src / librustc_traits / lowering / environment.rs
index 017368558314824c1dfa9c8bdf227680b58135fa..f923f51529aa9d4c313f02499a8906750032f848 100644 (file)
@@ -25,7 +25,7 @@ fn new(tcx: TyCtxt<'tcx>, round: &'a mut FxHashSet<Clause<'tcx>>) -> Self {
     }
 
     fn visit_ty(&mut self, ty: Ty<'tcx>) {
-        match ty.sty {
+        match ty.kind {
             ty::Projection(data) => {
                 self.round.extend(
                     self.tcx.program_clauses_for(data.item_def_id)
@@ -160,7 +160,7 @@ fn visit_clause(&mut self, clause: Clause<'tcx>) {
     );
 }
 
-crate fn environment<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Environment<'tcx> {
+crate fn environment(tcx: TyCtxt<'_>, def_id: DefId) -> Environment<'_> {
     use super::{Lower, IntoFromEnvGoal};
     use rustc::hir::{Node, TraitItemKind, ImplItemKind, ItemKind, ForeignItemKind};
 
@@ -195,17 +195,17 @@ enum NodeKind {
     };
 
     let node_kind = match node {
-        Node::TraitItem(item) => match item.node {
+        Node::TraitItem(item) => match item.kind {
             TraitItemKind::Method(..) => NodeKind::Fn,
             _ => NodeKind::Other,
         }
 
-        Node::ImplItem(item) => match item.node {
+        Node::ImplItem(item) => match item.kind {
             ImplItemKind::Method(..) => NodeKind::Fn,
             _ => NodeKind::Other,
         }
 
-        Node::Item(item) => match item.node {
+        Node::Item(item) => match item.kind {
             ItemKind::Impl(.., Some(..), _, _) => NodeKind::TraitImpl,
             ItemKind::Impl(.., None, _, _) => NodeKind::InherentImpl,
             ItemKind::Fn(..) => NodeKind::Fn,