summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zjit/src/codegen.rs2
-rw-r--r--zjit/src/hir.rs15
2 files changed, 2 insertions, 15 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs
index 03228db0bb..bd7ab84786 100644
--- a/zjit/src/codegen.rs
+++ b/zjit/src/codegen.rs
@@ -1290,7 +1290,7 @@ fn gen_new_range(
gen_prepare_non_leaf_call(jit, asm, state);
// Call rb_range_new(low, high, flag)
- asm_ccall!(asm, rb_range_new, low, high, (flag as i64).into())
+ asm_ccall!(asm, rb_range_new, low, high, (flag as i32).into())
}
fn gen_new_range_fixnum(
diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs
index b3a57a7439..0351b965f8 100644
--- a/zjit/src/hir.rs
+++ b/zjit/src/hir.rs
@@ -286,6 +286,7 @@ impl Const {
}
}
+#[derive(Clone, Copy)]
pub enum RangeType {
Inclusive = 0, // include the end value
Exclusive = 1, // exclude the end value
@@ -306,14 +307,6 @@ impl std::fmt::Debug for RangeType {
}
}
-impl Clone for RangeType {
- fn clone(&self) -> Self {
- *self
- }
-}
-
-impl Copy for RangeType {}
-
impl From<u32> for RangeType {
fn from(flag: u32) -> Self {
match flag {
@@ -324,12 +317,6 @@ impl From<u32> for RangeType {
}
}
-impl From<RangeType> for u32 {
- fn from(range_type: RangeType) -> Self {
- range_type as u32
- }
-}
-
/// Special regex backref symbol types
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum SpecialBackrefSymbol {