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;