about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/compiler/scope.rs4
-rw-r--r--tvix/eval/src/opcode.rs4
-rw-r--r--tvix/eval/src/value/attrs.rs1
-rw-r--r--tvix/eval/src/vm.rs1
4 files changed, 5 insertions, 5 deletions
diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs
index b0fca3d35ea4..87b43ad1cabb 100644
--- a/tvix/eval/src/compiler/scope.rs
+++ b/tvix/eval/src/compiler/scope.rs
@@ -71,7 +71,7 @@ pub enum LocalPosition {
 
 /// Represents the different ways in which upvalues can be captured in
 /// closures or thunks.
-#[derive(Clone, Debug, PartialEq)]
+#[derive(Clone, Debug, PartialEq, Eq)]
 pub enum Upvalue {
     /// This upvalue captures a local from the stack.
     Local(LocalIdx),
@@ -95,7 +95,7 @@ pub enum Upvalue {
 /// is subtly different from its `StackIdx` (which excludes
 /// uninitialised values in between).
 #[repr(transparent)]
-#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd)]
 pub struct LocalIdx(usize);
 
 /// Represents a scope known during compilation, which can be resolved
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs
index 18f0fce3cb0b..b009686736bc 100644
--- a/tvix/eval/src/opcode.rs
+++ b/tvix/eval/src/opcode.rs
@@ -13,12 +13,12 @@ pub struct CodeIdx(pub usize);
 
 /// Index of a value in the runtime stack.
 #[repr(transparent)]
-#[derive(Clone, Copy, Debug, PartialEq)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
 pub struct StackIdx(pub usize);
 
 /// Index of an upvalue within a closure's upvalue list.
 #[repr(transparent)]
-#[derive(Clone, Copy, Debug, PartialEq)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
 pub struct UpvalueIdx(pub usize);
 
 /// Offset by which an instruction pointer should change in a jump.
diff --git a/tvix/eval/src/value/attrs.rs b/tvix/eval/src/value/attrs.rs
index d05cc177d492..2954f8522097 100644
--- a/tvix/eval/src/value/attrs.rs
+++ b/tvix/eval/src/value/attrs.rs
@@ -215,6 +215,7 @@ impl NixAttrs {
         self.0.contains(key)
     }
 
+    #[allow(clippy::needless_lifetimes)]
     pub fn iter<'a>(&'a self) -> Iter<KeyValue<'a>> {
         Iter(match &self.0 {
             AttrsRep::Map(map) => KeyValue::Map(map.iter()),
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 091a4ebb38ab..ec8c0bc506e2 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -527,7 +527,6 @@ impl VM {
     fn resolve_dynamic_upvalue(&mut self, ident_idx: ConstantIdx) -> EvalResult<Value> {
         let chunk = self.chunk();
         let ident = chunk.constant(ident_idx).as_str()?.to_string();
-        drop(chunk); // some lifetime trickery due to cell::Ref
 
         // Peek at the current instruction (note: IP has already
         // advanced!) to see if it is actually data indicating a