about summary refs log tree commit diff
path: root/tvix/eval/src/compiler
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-23T12·54+0200
committerflokli <flokli@flokli.de>2024-01-24T14·00+0000
commite1d25891638597b0085033fd99814fce83fab4b9 (patch)
tree60f8250dfe2780430e3cbc0ae810426955094ca7 /tvix/eval/src/compiler
parentadff7be4d15e9c038e1600559d5d7226023c3c73 (diff)
fix(tvix/eval/value/function): use BTreeMap for function arg names r/7447
At least toXML wants to get these out in a sorted fashion.

Change-Id: I6373d7488fff7c40dc2ddeeecd03ba537c92c4af
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10685
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/compiler')
-rw-r--r--tvix/eval/src/compiler/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 5e0c1899c0e5..4bb734290c3e 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -21,7 +21,7 @@ mod scope;
 use codemap::Span;
 use rnix::ast::{self, AstToken};
 use smol_str::SmolStr;
-use std::collections::HashMap;
+use std::collections::{BTreeMap, HashMap};
 use std::path::{Path, PathBuf};
 use std::rc::{Rc, Weak};
 use std::sync::Arc;
@@ -994,7 +994,7 @@ impl Compiler<'_> {
         // the bindings to first declare them, then populate them, and
         // then finalise any necessary recursion into the scope.
         let mut entries: Vec<TrackedFormal> = vec![];
-        let mut arguments = HashMap::default();
+        let mut arguments = BTreeMap::default();
 
         for entry in pattern.pat_entries() {
             let ident = entry.ident().unwrap();