Skip to content

Commit 086f356

Browse files
committed
Rustup to rustc 1.31.0-nightly (77af314 2018-10-11)
1 parent 2b9c1e9 commit 086f356

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/constant.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::borrow::Cow;
12
use cranelift_module::*;
23
use crate::prelude::*;
34
use crate::rustc::mir::interpret::{
@@ -225,7 +226,7 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
225226

226227
data_ctx.define(alloc.bytes.to_vec().into_boxed_slice());
227228

228-
for &(offset, reloc) in alloc.relocations.iter() {
229+
for &(offset, (_tag, reloc)) in alloc.relocations.iter() {
229230
let reloc_offset = {
230231
let endianness = tcx.data_layout.endian;
231232
let offset = offset.bytes() as usize;
@@ -279,7 +280,9 @@ struct TransPlaceInterpreter;
279280
impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
280281
type MemoryData = ();
281282
type MemoryKinds = ();
282-
const MUT_STATIC_KIND: Option<()> = None;
283+
type MemoryMap = FxHashMap<AllocId, (MemoryKind<()>, Allocation<()>)>;
284+
type PointerTag = ();
285+
const STATIC_KIND: Option<()> = None;
283286
const ENFORCE_VALIDITY: bool = true;
284287

285288
fn before_terminator(_: &mut EvalContext<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx> {
@@ -308,10 +311,14 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
308311
fn find_foreign_static(
309312
_: crate::rustc::ty::query::TyCtxtAt<'a, 'tcx, 'tcx>,
310313
_: DefId,
311-
) -> EvalResult<'tcx, &'tcx Allocation> {
314+
) -> EvalResult<'tcx, Cow<'tcx, Allocation>> {
312315
panic!();
313316
}
314317

318+
fn static_with_default_tag(alloc: &Allocation) -> Cow<Allocation<()>> {
319+
Cow::Borrowed(alloc)
320+
}
321+
315322
fn ptr_op(
316323
_: &EvalContext<'a, 'mir, 'tcx, Self>,
317324
_: mir::BinOp,

0 commit comments

Comments
 (0)