From 17dd44ee92a0fc08fd6bc04c10ecd880d7a225a9 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 1 Jun 2020 19:23:54 +0200 Subject: [PATCH] rustup --- rust-version | 2 +- src/machine.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rust-version b/rust-version index c5327e4d2bb..daae7a34d04 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -5fd2f06e99a985dd896684cb2c9f8c7090eca1ab +d3cba254e464303a6495942f3a831c2bbd7f1768 diff --git a/src/machine.rs b/src/machine.rs index 51aa7ae3104..4f45b4f93f1 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -22,6 +22,7 @@ use rustc_middle::{ }, }; use rustc_span::symbol::{sym, Symbol}; +use rustc_span::def_id::DefId; use rustc_target::abi::{LayoutOf, Size}; use crate::*; @@ -416,10 +417,18 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> { Ok(()) } + fn thread_local_alloc_id( + ecx: &mut InterpCx<'mir, 'tcx, Self>, + def_id: DefId, + ) -> InterpResult<'tcx, AllocId> { + ecx.get_or_create_thread_local_alloc_id(def_id) + } + fn adjust_global_const( ecx: &InterpCx<'mir, 'tcx, Self>, mut val: mir::interpret::ConstValue<'tcx>, ) -> InterpResult<'tcx, mir::interpret::ConstValue<'tcx>> { + // FIXME: Remove this, do The Right Thing in `thread_local_alloc_id` instead. ecx.remap_thread_local_alloc_ids(&mut val)?; Ok(val) }