about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/compiler/scope.rs')
-rw-r--r--tvix/eval/src/compiler/scope.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs
index 87b43ad1cabb..01e0801e65c6 100644
--- a/tvix/eval/src/compiler/scope.rs
+++ b/tvix/eval/src/compiler/scope.rs
@@ -72,7 +72,7 @@ pub enum LocalPosition {
 /// Represents the different ways in which upvalues can be captured in
 /// closures or thunks.
 #[derive(Clone, Debug, PartialEq, Eq)]
-pub enum Upvalue {
+pub enum UpvalueKind {
     /// This upvalue captures a local from the stack.
     Local(LocalIdx),
 
@@ -91,6 +91,11 @@ pub enum Upvalue {
     },
 }
 
+#[derive(Clone, Debug)]
+pub struct Upvalue {
+    pub kind: UpvalueKind,
+}
+
 /// Represents the index of a local in the scope's local array, which
 /// is subtly different from its `StackIdx` (which excludes
 /// uninitialised values in between).