Skip to content

Commit 8d5728a

Browse files
committed
Fixmes and style fixes
1 parent 605ea9d commit 8d5728a

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/librustc_mir/interpret/eval_context.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,9 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> {
641641
&self,
642642
gid: GlobalId<'tcx>,
643643
) -> InterpResult<'tcx, MPlaceTy<'tcx, M::PointerTag>> {
644+
// FIXME(oli-obk): make this check an assertion that it's not a static here
645+
// FIXME(RalfJ, oli-obk): document that `Place::Static` can never be anything but a static
646+
// and `ConstValue::Unevaluated` can never be a static
644647
let param_env = if self.tcx.is_static(gid.instance.def_id()) {
645648
ty::ParamEnv::reveal_all()
646649
} else {

src/librustc_mir/interpret/validity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
396396
if let Some(ref mut ref_tracking) = self.ref_tracking {
397397
assert!(self.const_mode, "We should only do recursie checking in const mode");
398398
let place = self.ecx.ref_to_mplace(value)?;
399+
// FIXME(RalfJ): check ZST for inbound pointers
399400
if size != Size::ZERO {
400401
// Non-ZST also have to be dereferencable
401402
let ptr = try_validation!(place.ptr.to_ptr(),

src/librustc_mir/interpret/visitor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::
8181
ecx.operand_field(self, field)
8282
}
8383
}
84+
8485
impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'tcx, M::PointerTag> {
8586
#[inline(always)]
8687
fn layout(&self) -> TyLayout<'tcx> {

0 commit comments

Comments
 (0)