]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/interpret/place.rs
Move def_id out add substsref
[rust.git] / src / librustc_mir / interpret / place.rs
index 85f9cbd37589ab2260f0d66211e44d5539759128..23c9e7fdf67ce7c692f62723408c1200e68f887f 100644 (file)
@@ -585,7 +585,7 @@ pub(super) fn eval_static_to_mplace(
         use rustc::mir::StaticKind;
 
         Ok(match place_static.kind {
-            StaticKind::Promoted(promoted) => {
+            StaticKind::Promoted(promoted, _) => {
                 let instance = self.frame().instance;
                 self.const_eval_raw(GlobalId {
                     instance,
@@ -593,11 +593,11 @@ pub(super) fn eval_static_to_mplace(
                 })?
             }
 
-            StaticKind::Static(def_id) => {
+            StaticKind::Static => {
                 let ty = place_static.ty;
                 assert!(!ty.needs_subst());
                 let layout = self.layout_of(ty)?;
-                let instance = ty::Instance::mono(*self.tcx, def_id);
+                let instance = ty::Instance::mono(*self.tcx, place_static.def_id);
                 let cid = GlobalId {
                     instance,
                     promoted: None