let tcx = self.tcx;
let param_env = self.param_env;
let region_scope_tree = self.tcx.region_scope_tree(item_def_id);
- euv::ExprUseVisitor::new(self, tcx, param_env, ®ion_scope_tree, self.tables, None)
+ let tables = self.tables;
+ euv::ExprUseVisitor::new(self, tcx, param_env, ®ion_scope_tree, tables, None)
.consume_body(body);
let body_promotable = self.check_expr(&body.value);
e: &'tcx hir::Expr, node_ty: Ty<'tcx>) -> Promotability {
let ty_result = match node_ty.sty {
- ty::TyAdt(def, _) if def.has_dtor(v.tcx) => {
+ ty::Adt(def, _) if def.has_dtor(v.tcx) => {
NotPromotable
}
_ => Promotable
return NotPromotable;
}
match v.tables.node_id_to_type(lhs.hir_id).sty {
- ty::TyRawPtr(_) => {
+ ty::RawPtr(_) => {
assert!(op.node == hir::BinOpKind::Eq || op.node == hir::BinOpKind::Ne ||
op.node == hir::BinOpKind::Le || op.node == hir::BinOpKind::Lt ||
op.node == hir::BinOpKind::Ge || op.node == hir::BinOpKind::Gt);
Some(ref expr) => { struct_result = struct_result & v.check_expr(&expr); },
None => {},
}
- if let ty::TyAdt(adt, ..) = v.tables.expr_ty(e).sty {
+ if let ty::Adt(adt, ..) = v.tables.expr_ty(e).sty {
// unsafe_cell_type doesn't necessarily exist with no_core
if Some(adt.did) == v.tcx.lang_items().unsafe_cell_type() {
return NotPromotable;