This commit is contained in:
Matthias Krüger
2018-12-08 01:56:03 +01:00
committed by Philipp Hansch
parent 26602ddff4
commit f13d23de41
46 changed files with 140 additions and 140 deletions

View File

@@ -43,7 +43,7 @@ impl LintPass for EmptyEnum {
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);
let did = cx.tcx.hir().local_def_id(item.id);
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");