Fixmes and style fixes
This commit is contained in:
parent
605ea9d05c
commit
8d5728a7c8
3 changed files with 5 additions and 0 deletions
|
@ -641,6 +641,9 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> {
|
|||
&self,
|
||||
gid: GlobalId<'tcx>,
|
||||
) -> InterpResult<'tcx, MPlaceTy<'tcx, M::PointerTag>> {
|
||||
// FIXME(oli-obk): make this check an assertion that it's not a static here
|
||||
// FIXME(RalfJ, oli-obk): document that `Place::Static` can never be anything but a static
|
||||
// and `ConstValue::Unevaluated` can never be a static
|
||||
let param_env = if self.tcx.is_static(gid.instance.def_id()) {
|
||||
ty::ParamEnv::reveal_all()
|
||||
} else {
|
||||
|
|
|
@ -396,6 +396,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
|
|||
if let Some(ref mut ref_tracking) = self.ref_tracking {
|
||||
assert!(self.const_mode, "We should only do recursie checking in const mode");
|
||||
let place = self.ecx.ref_to_mplace(value)?;
|
||||
// FIXME(RalfJ): check ZST for inbound pointers
|
||||
if size != Size::ZERO {
|
||||
// Non-ZST also have to be dereferencable
|
||||
let ptr = try_validation!(place.ptr.to_ptr(),
|
||||
|
|
|
@ -81,6 +81,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::
|
|||
ecx.operand_field(self, field)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'tcx, M::PointerTag> {
|
||||
#[inline(always)]
|
||||
fn layout(&self) -> TyLayout<'tcx> {
|
||||
|
|
Loading…
Reference in a new issue