use rustc::hir;
use rustc::ty::{self, TyCtxt};
-use rustc::mir::{Mir, Place, PlaceBase, ProjectionElem};
+use rustc::mir::{Body, Place, PlaceBase, ProjectionElem};
pub trait IsPrefixOf<'tcx> {
fn is_prefix_of(&self, other: &Place<'tcx>) -> bool;
pub(super) struct Prefixes<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
- mir: &'cx Mir<'tcx>,
+ mir: &'cx Body<'tcx>,
tcx: TyCtxt<'cx, 'gcx, 'tcx>,
kind: PrefixSet,
next: Option<&'cx Place<'tcx>>,
// derefs, except we stop at the deref of a shared
// reference.
- let ty = proj.base.ty(self.mir, self.tcx).to_ty(self.tcx);
+ let ty = proj.base.ty(self.mir, self.tcx).ty;
match ty.sty {
ty::RawPtr(_) |
ty::Ref(