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<'_>,
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
};
"[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,
"*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,