Remove potentially wrong PartialEq from PrimVal.

This commit is contained in:
Scott Olson 2016-12-16 00:06:03 -08:00
parent 67e1627a55
commit e615f671ce
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
for (index, const_val) in values.iter().enumerate() {
let val = self.const_to_value(const_val)?;
let prim = self.value_to_primval(val, discr_ty)?;
if discr_prim == prim {
if discr_prim.bits() == prim.bits() {
target_block = targets[index];
break;
}

View File

@ -47,7 +47,7 @@ pub enum Value {
/// `memory::Allocation`. It is in many ways like a small chunk of a `Allocation`, up to 8 bytes in
/// size. Like a range of bytes in an `Allocation`, a `PrimVal` can either represent the raw bytes
/// of a simple value, a pointer into another `Allocation`, or be undefined.
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug)]
pub enum PrimVal {
/// The raw bytes of a simple value.
Bytes(u64),