use std::cell::RefCell;
use syntax::ast;
use syntax::codemap;
-use syntax::print::pprust;
+use rustc_front::print::pprust;
+use rustc_front::hir;
pub struct MoveErrorCollector<'tcx> {
errors: RefCell<Vec<MoveError<'tcx>>>
mc::cat_interior(ref b, mc::InteriorElement(Kind::Index, _)) => {
let expr = bccx.tcx.map.expect_expr(move_from.id);
- if let ast::ExprIndex(..) = expr.node {
+ if let hir::ExprIndex(..) = expr.node {
bccx.span_err(move_from.span,
&format!("cannot move out of type `{}`, \
a non-copy fixed-size array",
mc::cat_downcast(ref b, _) |
mc::cat_interior(ref b, mc::InteriorField(_)) => {
match b.ty.sty {
- ty::TyStruct(did, _) |
- ty::TyEnum(did, _) if bccx.tcx.has_dtor(did) => {
+ ty::TyStruct(def, _) |
+ ty::TyEnum(def, _) if def.has_dtor() => {
bccx.span_err(
move_from.span,
&format!("cannot move out of type `{}`, \