Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 161c8aa

Browse files
committed
Rustup to rustc 1.37.0-nightly (7cdaffd 2019-06-05)
1 parent d3dbf35 commit 161c8aa

File tree

5 files changed

+14
-26
lines changed

5 files changed

+14
-26
lines changed

src/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ fn codegen_fn_content<'a, 'tcx: 'a>(fx: &mut FunctionCx<'a, 'tcx, impl Backend>)
288288
} => {
289289
let ty = location.ty(fx.mir, fx.tcx).ty;
290290
let ty = fx.monomorphize(&ty);
291-
let drop_fn = crate::rustc_mir::monomorphize::resolve_drop_in_place(fx.tcx, ty);
291+
let drop_fn = Instance::resolve_drop_in_place(fx.tcx, ty);
292292

293293
if let ty::InstanceDef::DropGlue(_, None) = drop_fn.def {
294294
// we don't actually need to drop anything
@@ -603,7 +603,7 @@ fn trans_stmt<'a, 'tcx: 'a>(
603603
let operand = trans_operand(fx, operand);
604604
match operand.layout().ty.sty {
605605
ty::Closure(def_id, substs) => {
606-
let instance = rustc_mir::monomorphize::resolve_closure(
606+
let instance = Instance::resolve_closure(
607607
fx.tcx,
608608
def_id,
609609
substs,

src/constant.rs

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc::mir::interpret::{
55
};
66
use rustc::ty::Const;
77
use rustc_mir::interpret::{
8-
InterpretCx, ImmTy, MPlaceTy, Machine, Memory, MemoryKind, OpTy, PlaceTy, Pointer,
8+
InterpretCx, ImmTy, Machine, Memory, MemoryKind, OpTy, PlaceTy,
99
StackPopCleanup,
1010
};
1111

@@ -375,7 +375,6 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
375375
fn find_foreign_static(
376376
_: DefId,
377377
_: ::rustc::ty::query::TyCtxtAt<'a, 'tcx, 'tcx>,
378-
_: &(),
379378
) -> EvalResult<'tcx, Cow<'tcx, Allocation>> {
380379
panic!();
381380
}
@@ -393,27 +392,17 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
393392
panic!();
394393
}
395394

396-
fn tag_dereference(
397-
_: &InterpretCx<'a, 'mir, 'tcx, Self>,
398-
_: MPlaceTy<'tcx>,
399-
_: Option<::rustc::hir::Mutability>,
400-
) -> EvalResult<'tcx, Scalar> {
401-
panic!();
402-
}
403-
404-
fn adjust_static_allocation<'alloc>(
405-
alloc: &'alloc Allocation,
395+
fn tag_allocation<'b>(
396+
_: AllocId,
397+
alloc: Cow<'b, Allocation>,
398+
_: Option<MemoryKind<!>>,
406399
_: &(),
407-
) -> Cow<'alloc, Allocation> {
408-
Cow::Borrowed(alloc)
400+
) -> (Cow<'b, Allocation<(), ()>>, ()) {
401+
(alloc, ())
409402
}
410403

411-
fn new_allocation(
412-
_: Size,
413-
_: &(),
414-
_: MemoryKind<!>,
415-
) -> ((), ()) {
416-
((), ())
404+
fn tag_static_base_pointer(_: AllocId, _: &()) -> Self::PointerTag {
405+
()
417406
}
418407

419408
fn stack_push(_: &mut InterpretCx<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx> {

src/driver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use rustc::mir::mono::{Linkage as RLinkage, Visibility};
88
use rustc::session::config::{DebugInfo, OutputType};
99
use rustc_codegen_ssa::back::linker::LinkerInfo;
1010
use rustc_codegen_ssa::CrateInfo;
11-
use rustc_mir::monomorphize::partitioning::CodegenUnitExt;
1211

1312
use cranelift_faerie::*;
1413

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ mod prelude {
5656

5757
pub use rustc::bug;
5858
pub use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
59-
pub use rustc::mir::{self, interpret::AllocId, *};
59+
pub use rustc::mir::{self, interpret::AllocId, mono::MonoItem, *};
6060
pub use rustc::session::{
6161
config::{CrateType, Lto},
6262
Session,
@@ -71,7 +71,7 @@ mod prelude {
7171
indexed_vec::Idx,
7272
sync::Lrc,
7373
};
74-
pub use rustc_mir::monomorphize::{collector, MonoItem};
74+
pub use rustc_mir::monomorphize::collector;
7575

7676
pub use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
7777
pub use rustc_codegen_ssa::traits::*;

src/vtable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn build_vtable<'a, 'tcx: 'a>(
8989
let drop_in_place_fn = import_function(
9090
tcx,
9191
fx.module,
92-
crate::rustc_mir::monomorphize::resolve_drop_in_place(tcx, ty),
92+
Instance::resolve_drop_in_place(tcx, ty),
9393
);
9494

9595
let mut components: Vec<_> = vec![Some(drop_in_place_fn), None, None];

0 commit comments

Comments
 (0)