Skip to content

Commit 78b93f9

Browse files
author
Alexander Regueiro
committed
Removed dead code.
1 parent 0aeca67 commit 78b93f9

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/librustc_mir/interpret/eval_context.rs

-9
Original file line numberDiff line numberDiff line change
@@ -1037,15 +1037,6 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
10371037
}
10381038

10391039
pub fn read_global_as_value(&mut self, gid: GlobalId<'tcx>, ty: Ty<'tcx>) -> EvalResult<'tcx, Value> {
1040-
if self.tcx.is_static(gid.instance.def_id()).is_some() {
1041-
let alloc_id = self
1042-
.tcx
1043-
.alloc_map
1044-
.lock()
1045-
.intern_static(gid.instance.def_id());
1046-
let layout = self.layout_of(ty)?;
1047-
return Ok(Value::ByRef(Scalar::Ptr(alloc_id.into()), layout.align))
1048-
}
10491040
let cv = self.const_eval(gid)?;
10501041
self.const_to_value(&cv.val, ty)
10511042
}

0 commit comments

Comments
 (0)