diff --git a/rust-toolchain b/rust-toolchain index 295c041848b6..839a020ec18c 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-03-24 +nightly-2020-03-28 diff --git a/src/abi/comments.rs b/src/abi/comments.rs index 0ac3bec74c7b..4f5fb0f2e44e 100644 --- a/src/abi/comments.rs +++ b/src/abi/comments.rs @@ -61,15 +61,15 @@ pub(super) fn add_local_place_comments<'tcx>( place: CPlace<'tcx>, local: Local, ) { - let TyLayout { ty, details } = place.layout(); - let ty::layout::LayoutDetails { + let TyLayout { ty, layout } = place.layout(); + let ty::layout::Layout { size, align, abi: _, variants: _, fields: _, largest_niche: _, - } = details; + } = layout; let (kind, extra) = match *place.inner() { CPlaceInner::Var(var) => { diff --git a/src/base.rs b/src/base.rs index 9709dce697f5..d2841b25f5ea 100644 --- a/src/base.rs +++ b/src/base.rs @@ -573,7 +573,13 @@ fn trans_stmt<'tcx>( } Rvalue::Repeat(operand, times) => { let operand = trans_operand(fx, operand); - for i in 0..*times { + let times = fx + .monomorphize(times) + .eval(fx.tcx, ParamEnv::reveal_all()) + .val + .try_to_bits(fx.tcx.data_layout.pointer_size) + .unwrap(); + for i in 0..times { let index = fx.bcx.ins().iconst(fx.pointer_type, i as i64); let to = lval.place_index(fx, index); to.write_cvalue(fx, operand); @@ -642,14 +648,14 @@ fn trans_stmt<'tcx>( | StatementKind::Retag { .. } | StatementKind::AscribeUserType(..) => {} - StatementKind::InlineAsm(asm) => { + StatementKind::LlvmInlineAsm(asm) => { use rustc_ast::ast::Name; - let InlineAsm { + let LlvmInlineAsm { asm, outputs: _, inputs: _, } = &**asm; - let rustc_hir::InlineAsmInner { + let rustc_hir::LlvmInlineAsmInner { asm: asm_code, // Name outputs, // Vec inputs, // Vec diff --git a/src/constant.rs b/src/constant.rs index 98a69c11cdd2..7bd2f4761932 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -391,7 +391,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut Module, cx: &mu struct TransPlaceInterpreter; impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter { - type MemoryKinds = !; + type MemoryKind = !; type ExtraFnVal = !; type PointerTag = (); type AllocExtra = (); @@ -400,7 +400,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter { type MemoryMap = FxHashMap, Allocation<()>)>; const CHECK_ALIGN: bool = true; - const STATIC_KIND: Option = None; + const GLOBAL_KIND: Option = None; fn enforce_validity(_: &InterpCx<'mir, 'tcx, Self>) -> bool { false @@ -458,7 +458,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter { (alloc, ()) } - fn tag_static_base_pointer(_: &(), _: AllocId) -> Self::PointerTag { + fn tag_global_base_pointer(_: &(), _: AllocId) -> Self::PointerTag { () }