From 4cb1f639b7efeb30c8ca3e2fa97a85355ecdb7ac Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 13 Mar 2017 11:28:45 +0100 Subject: [PATCH] Rustup to rustc 1.17.0-nightly (824c9ebbd 2017-03-12) --- src/lvalue.rs | 4 ++-- src/step.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lvalue.rs b/src/lvalue.rs index d4d292cd4e53..8971f050a899 100644 --- a/src/lvalue.rs +++ b/src/lvalue.rs @@ -137,9 +137,9 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { Local(mir::RETURN_POINTER) => self.frame().return_lvalue, Local(local) => Lvalue::Local { frame: self.stack.len() - 1, local, field: None }, - Static(def_id) => { + Static(ref statik) => { let substs = self.tcx.intern_substs(&[]); - Lvalue::Global(GlobalId { def_id, substs, promoted: None }) + Lvalue::Global(GlobalId { def_id: statik.def_id, substs, promoted: None }) } Projection(ref proj) => return self.eval_lvalue_projection(proj), diff --git a/src/step.rs b/src/step.rs index c08ac9693a4b..ced709b3a934 100644 --- a/src/step.rs +++ b/src/step.rs @@ -242,7 +242,8 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for ConstantExtractor<'a, 'b, 'tcx> { location: mir::Location ) { self.super_lvalue(lvalue, context, location); - if let mir::Lvalue::Static(def_id) = *lvalue { + if let mir::Lvalue::Static(ref statik) = *lvalue { + let def_id = statik.def_id; let substs = self.ecx.tcx.intern_substs(&[]); let span = self.span; if let Some(node_item) = self.ecx.tcx.hir.get_if_local(def_id) {