Rustup to rustc 1.37.0-nightly (7cdaffd79 2019-06-05)

This commit is contained in:
bjorn3 2019-06-06 20:31:09 +02:00
parent d3dbf358ae
commit 161c8aa5cf
5 changed files with 15 additions and 27 deletions

View File

@ -288,7 +288,7 @@ fn codegen_fn_content<'a, 'tcx: 'a>(fx: &mut FunctionCx<'a, 'tcx, impl Backend>)
} => {
let ty = location.ty(fx.mir, fx.tcx).ty;
let ty = fx.monomorphize(&ty);
let drop_fn = crate::rustc_mir::monomorphize::resolve_drop_in_place(fx.tcx, ty);
let drop_fn = Instance::resolve_drop_in_place(fx.tcx, ty);
if let ty::InstanceDef::DropGlue(_, None) = drop_fn.def {
// we don't actually need to drop anything
@ -603,7 +603,7 @@ fn is_fat_ptr<'a, 'tcx: 'a>(fx: &FunctionCx<'a, 'tcx, impl Backend>, ty: Ty<'tcx
let operand = trans_operand(fx, operand);
match operand.layout().ty.sty {
ty::Closure(def_id, substs) => {
let instance = rustc_mir::monomorphize::resolve_closure(
let instance = Instance::resolve_closure(
fx.tcx,
def_id,
substs,

View File

@ -5,7 +5,7 @@
};
use rustc::ty::Const;
use rustc_mir::interpret::{
InterpretCx, ImmTy, MPlaceTy, Machine, Memory, MemoryKind, OpTy, PlaceTy, Pointer,
InterpretCx, ImmTy, Machine, Memory, MemoryKind, OpTy, PlaceTy,
StackPopCleanup,
};
@ -375,7 +375,6 @@ fn call_intrinsic(
fn find_foreign_static(
_: DefId,
_: ::rustc::ty::query::TyCtxtAt<'a, 'tcx, 'tcx>,
_: &(),
) -> EvalResult<'tcx, Cow<'tcx, Allocation>> {
panic!();
}
@ -393,27 +392,17 @@ fn box_alloc(_: &mut InterpretCx<'a, 'mir, 'tcx, Self>, _: PlaceTy<'tcx>) -> Eva
panic!();
}
fn tag_dereference(
_: &InterpretCx<'a, 'mir, 'tcx, Self>,
_: MPlaceTy<'tcx>,
_: Option<::rustc::hir::Mutability>,
) -> EvalResult<'tcx, Scalar> {
panic!();
fn tag_allocation<'b>(
_: AllocId,
alloc: Cow<'b, Allocation>,
_: Option<MemoryKind<!>>,
_: &(),
) -> (Cow<'b, Allocation<(), ()>>, ()) {
(alloc, ())
}
fn adjust_static_allocation<'alloc>(
alloc: &'alloc Allocation,
_: &(),
) -> Cow<'alloc, Allocation> {
Cow::Borrowed(alloc)
}
fn new_allocation(
_: Size,
_: &(),
_: MemoryKind<!>,
) -> ((), ()) {
((), ())
fn tag_static_base_pointer(_: AllocId, _: &()) -> Self::PointerTag {
()
}
fn stack_push(_: &mut InterpretCx<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx> {

View File

@ -8,7 +8,6 @@
use rustc::session::config::{DebugInfo, OutputType};
use rustc_codegen_ssa::back::linker::LinkerInfo;
use rustc_codegen_ssa::CrateInfo;
use rustc_mir::monomorphize::partitioning::CodegenUnitExt;
use cranelift_faerie::*;

View File

@ -56,7 +56,7 @@ mod prelude {
pub use rustc::bug;
pub use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
pub use rustc::mir::{self, interpret::AllocId, *};
pub use rustc::mir::{self, interpret::AllocId, mono::MonoItem, *};
pub use rustc::session::{
config::{CrateType, Lto},
Session,
@ -71,7 +71,7 @@ mod prelude {
indexed_vec::Idx,
sync::Lrc,
};
pub use rustc_mir::monomorphize::{collector, MonoItem};
pub use rustc_mir::monomorphize::collector;
pub use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
pub use rustc_codegen_ssa::traits::*;

View File

@ -89,7 +89,7 @@ fn build_vtable<'a, 'tcx: 'a>(
let drop_in_place_fn = import_function(
tcx,
fx.module,
crate::rustc_mir::monomorphize::resolve_drop_in_place(tcx, ty),
Instance::resolve_drop_in_place(tcx, ty),
);
let mut components: Vec<_> = vec![Some(drop_in_place_fn), None, None];