//! only dead if the end of the function's block can never be reached.
//! It is the responsibility of typeck to ensure that there are no
//! `return` expressions in a function declared as diverging.
+
use self::LoopKind::*;
use self::LiveNodeKind::*;
use self::VarKind::*;
use hir::def::*;
+use hir::Node;
use ty::{self, TyCtxt};
use lint;
use errors::Applicability;
// Don't run unused pass for #[derive()]
if let FnKind::Method(..) = fk {
let parent = ir.tcx.hir.get_parent(id);
- if let Some(hir::map::Node::NodeItem(i)) = ir.tcx.hir.find(parent) {
+ if let Some(Node::Item(i)) = ir.tcx.hir.find(parent) {
if i.attrs.iter().any(|a| a.check_name("automatically_derived")) {
return;
}