use hir::def_id::DefId;
use hir::intravisit::{self, Visitor, NestedVisitorMap};
use hir::{Block, Arm, Pat, PatKind, Stmt, Expr, Local};
-use mir::transform::MirSource;
use rustc_data_structures::indexed_vec::Idx;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher,
StableHasherResult};
// The body of the every fn is a root scope.
self.cx.parent = self.cx.var_parent;
- if let MirSource::Fn(_) = MirSource::from_node(self.tcx, owner_id) {
+ if let hir::BodyOwnerKind::Fn = self.tcx.hir.body_owner_kind(owner_id) {
self.visit_expr(&body.value);
} else {
// Only functions have an outer terminating (drop) scope, while