Skip to content

Commit 8173feb

Browse files
committed
Avoid catch-all arm, use Base(PlaceBase::Static(_))
1 parent fc45382 commit 8173feb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_mir/interpret/operand.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,13 +472,12 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
472472
let op = match *mir_place {
473473
Base(PlaceBase::Local(mir::RETURN_PLACE)) => return err!(ReadFromReturnPointer),
474474
Base(PlaceBase::Local(local)) => self.access_local(self.frame(), local, layout)?,
475+
Base(PlaceBase::Static(_)) => self.eval_place_to_mplace(mir_place)?.into(),
475476

476477
Projection(ref proj) => {
477478
let op = self.eval_place_to_op(&proj.base, None)?;
478479
self.operand_projection(op, &proj.elem)?
479480
}
480-
481-
_ => self.eval_place_to_mplace(mir_place)?.into(),
482481
};
483482

484483
trace!("eval_place_to_op: got {:?}", *op);

0 commit comments

Comments
 (0)