//! lint when there is an enum with no variants
use rustc::lint::*;
+use rustc::{declare_lint, lint_array};
use rustc::hir::*;
use crate::utils::span_lint_and_then;
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
fn check_item(&mut self, cx: &LateContext, item: &Item) {
let did = cx.tcx.hir.local_def_id(item.id);
- if let ItemEnum(..) = item.node {
+ if let ItemKind::Enum(..) = item.node {
let ty = cx.tcx.type_of(did);
let adt = ty.ty_adt_def()
.expect("already checked whether this is an enum");