Skip to content

Commit 35d4d22

Browse files
committed
Rustup to rustc 1.31.0-nightly (424a749 2018-10-21)
1 parent 397c684 commit 35d4d22

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/constant.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::rustc::mir::interpret::{
44
read_target_uint, AllocId, AllocType, Allocation, ConstValue, EvalResult, GlobalId, Scalar,
55
};
66
use crate::rustc::ty::Const;
7-
use crate::rustc_mir::interpret::{EvalContext, Machine, Memory, MemoryKind, OpTy, PlaceTy};
7+
use crate::rustc_mir::interpret::{EvalContext, Machine, Memory, MemoryKind, OpTy, PlaceTy, Pointer};
88
use std::borrow::Cow;
99

1010
#[derive(Default)]
@@ -127,7 +127,6 @@ fn trans_const_place<'a, 'tcx: 'a>(
127127
fx.tcx.at(DUMMY_SP),
128128
ty::ParamEnv::reveal_all(),
129129
TransPlaceInterpreter,
130-
(),
131130
);
132131
let op = ecx.const_to_op(const_)?;
133132
let ptr = ecx.allocate(op.layout, MemoryKind::Stack)?;
@@ -188,7 +187,7 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
188187
module: &mut Module<B>,
189188
cx: &mut ConstantCx,
190189
) {
191-
let memory = Memory::<TransPlaceInterpreter>::new(tcx.at(DUMMY_SP), ());
190+
let memory = Memory::<TransPlaceInterpreter>::new(tcx.at(DUMMY_SP));
192191

193192
while let Some(todo_item) = pop_set(&mut cx.todo) {
194193
let (data_id, alloc) = match todo_item {
@@ -278,11 +277,12 @@ fn pop_set<T: Copy + Eq + ::std::hash::Hash>(set: &mut HashSet<T>) -> Option<T>
278277
struct TransPlaceInterpreter;
279278

280279
impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
281-
type MemoryData = ();
282-
type MemoryKinds = ();
283-
type MemoryMap = FxHashMap<AllocId, (MemoryKind<()>, Allocation<()>)>;
280+
type MemoryKinds = !;
284281
type PointerTag = ();
285-
const STATIC_KIND: Option<()> = None;
282+
type AllocExtra = ();
283+
type MemoryMap = FxHashMap<AllocId, (MemoryKind<!>, Allocation<()>)>;
284+
const STATIC_KIND: Option<!> = None;
285+
const ENABLE_PTR_TRACKING_HOOKS: bool = false;
286286

287287
fn enforce_validity(_: &EvalContext<'a, 'mir, 'tcx, Self>) -> bool {
288288
false
@@ -336,4 +336,12 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
336336
fn box_alloc(_: &mut EvalContext<'a, 'mir, 'tcx, Self>, _: PlaceTy<'tcx>) -> EvalResult<'tcx> {
337337
panic!();
338338
}
339+
340+
fn tag_reference(_: &mut EvalContext<'a, 'mir, 'tcx, Self>, _: Pointer<()>, _: Ty<'tcx>, _: Size, _: Option<BorrowKind>) -> EvalResult<'tcx> {
341+
panic!();
342+
}
343+
344+
fn tag_dereference(_: &EvalContext<'a, 'mir, 'tcx, Self>, _: Pointer<()>, _: Ty<'tcx>) -> EvalResult<'tcx> {
345+
panic!();
346+
}
339347
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(rustc_private, macro_at_most_once_rep)]
1+
#![feature(rustc_private, macro_at_most_once_rep, never_type)]
22
#![allow(intra_doc_link_resolution_failure)]
33

44
extern crate byteorder;

0 commit comments

Comments
 (0)