use type_of;
use value::Value;
use Disr;
-use rustc::ty::adjustment::{AdjustEmptyToAny, AdjustDerefRef, AdjustReifyFnPointer};
+use rustc::ty::adjustment::{AdjustNeverToAny, AdjustDerefRef, AdjustReifyFnPointer};
use rustc::ty::adjustment::{AdjustUnsafeFnPointer, AdjustMutToConstPointer};
use rustc::ty::adjustment::CustomCoerceUnsized;
use rustc::ty::{self, Ty, TyCtxt};
hir::ExprPath(..) => {
match bcx.tcx().expect_def(expr.id) {
Def::Const(did) | Def::AssociatedConst(did) => {
- let empty_substs = bcx.tcx().mk_substs(Substs::empty());
+ let empty_substs = Substs::empty(bcx.tcx());
let const_expr = consts::get_const_expr(bcx.ccx(), did, expr,
empty_substs);
// Temporarily get cleanup scopes out of the way,
}
match adjustment {
- AdjustEmptyToAny(..) => true,
+ AdjustNeverToAny(..) => true,
AdjustReifyFnPointer => true,
AdjustUnsafeFnPointer | AdjustMutToConstPointer => {
// purely a type-level thing
debug!("unadjusted datum for expr {:?}: {:?} adjustment={:?}",
expr, datum, adjustment);
match adjustment {
- AdjustEmptyToAny(ref target) => {
+ AdjustNeverToAny(ref target) => {
let mono_target = bcx.monomorphize(target);
let llty = type_of::type_of(bcx.ccx(), mono_target);
let dummy = C_undef(llty.ptr_to());
- datum = Datum::new(dummy, mono_target, Rvalue::new(ByRef)).to_expr_datum();
+ datum = Datum::new(dummy, mono_target, Lvalue::new("never")).to_expr_datum();
}
AdjustReifyFnPointer => {
match datum.ty.sty {