Skip to content

Commit

Permalink
Auto merge of #1507 - rust-lang:get_static, r=RalfJung
Browse files Browse the repository at this point in the history
Bump for rustc changes

rustc-side: rust-lang/rust#75394
  • Loading branch information
bors committed Aug 12, 2020
2 parents 50f3796 + 2f68a1f commit a44bb29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c92fc8db8b009b7661cff31fa59a7c0348653bd0
c94ed5ca91f1363b66970ce2cbd6e2773e3cb1d3
2 changes: 1 addition & 1 deletion src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
if tcx.is_foreign_item(def_id) {
throw_unsup_format!("foreign thread-local statics are not supported");
}
let allocation = interpret::get_static(*tcx, def_id)?;
let allocation = tcx.eval_static_initializer(def_id)?;
// Create a fresh allocation with this content.
let new_alloc_id = this.memory.allocate_with(allocation.clone(), MiriMemoryKind::Tls.into()).alloc_id;
this.machine.threads.set_thread_local_alloc_id(def_id, new_alloc_id);
Expand Down

0 comments on commit a44bb29

Please sign in to comment.