Remove potentially wrong PartialEq from PrimVal.
This commit is contained in:
parent
67e1627a55
commit
e615f671ce
@ -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;
|
||||
}
|
||||
|
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user