]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/coherence/inherent_impls.rs
Update to use new librustc_error_codes library
[rust.git] / src / librustc_typeck / coherence / inherent_impls.rs
index d2651317da948f069d7a05c9480ce62a2eac86d5..1c228396b8cb7f0ef3322d7c280d3d70a1a7fe2f 100644 (file)
@@ -15,6 +15,8 @@
 use syntax::ast;
 use syntax_pos::Span;
 
+use rustc_error_codes::*;
+
 /// On-demand query: yields a map containing all types mapped to their inherent impls.
 pub fn crate_inherent_impls(
     tcx: TyCtxt<'_>,
@@ -49,7 +51,7 @@ struct InherentCollect<'tcx> {
 
 impl ItemLikeVisitor<'v> for InherentCollect<'tcx> {
     fn visit_item(&mut self, item: &hir::Item) {
-        let ty = match item.node {
+        let ty = match item.kind {
             hir::ItemKind::Impl(.., None, ref ty, _) => ty,
             _ => return
         };
@@ -107,7 +109,7 @@ fn visit_item(&mut self, item: &hir::Item) {
                                           "[T]",
                                           item.span);
             }
-            ty::RawPtr(ty::TypeAndMut { ty: _, mutbl: hir::MutImmutable }) => {
+            ty::RawPtr(ty::TypeAndMut { ty: _, mutbl: hir::Mutability::Immutable }) => {
                 self.check_primitive_impl(def_id,
                                           lang_items.const_ptr_impl(),
                                           None,
@@ -115,7 +117,7 @@ fn visit_item(&mut self, item: &hir::Item) {
                                           "*const T",
                                           item.span);
             }
-            ty::RawPtr(ty::TypeAndMut { ty: _, mutbl: hir::MutMutable }) => {
+            ty::RawPtr(ty::TypeAndMut { ty: _, mutbl: hir::Mutability::Mutable }) => {
                 self.check_primitive_impl(def_id,
                                           lang_items.mut_ptr_impl(),
                                           None,