From dad07a8bc0369932a7b65efc2dd4181a8863eb5b Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 6 Nov 2022 10:07:46 -0500 Subject: refactor(tvix/eval): Be clearer about public interface Some new top-level re-exports (specifically VM, Builtin, and ErrorKind) were added to lib.rs in tvix/eval to allow the builtin-macros tests to work - we should be clear which of these are part of the public interface (I think it's reasonable for ErrorKind to be) and which aren't (specifically I'm not sure VM and Builtin necessarily should be, at least yet). Change-Id: I3bbeaa63cdda9227224cd3bc298a9bb8da4deb7c Reviewed-on: https://cl.tvl.fyi/c/depot/+/7203 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/builtin-macros/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tvix/eval/builtin-macros/src/lib.rs') diff --git a/tvix/eval/builtin-macros/src/lib.rs b/tvix/eval/builtin-macros/src/lib.rs index 18889505e6d4..8e2c4b3f8776 100644 --- a/tvix/eval/builtin-macros/src/lib.rs +++ b/tvix/eval/builtin-macros/src/lib.rs @@ -120,10 +120,10 @@ pub fn builtins(_args: TokenStream, item: TokenStream) -> TokenStream { reversed_args.reverse(); builtins.push(quote_spanned! { builtin_attr.span() => { - crate::value::Builtin::new( + crate::internal::Builtin::new( #name, &[#(#strictness),*], - |mut args: Vec, vm: &mut VM| { + |mut args: Vec, vm: &mut crate::internal::VM| { #(let #reversed_args = args.pop().unwrap();)* #fn_name(vm, #(#args),*) } @@ -134,7 +134,7 @@ pub fn builtins(_args: TokenStream, item: TokenStream) -> TokenStream { } items.push(parse_quote! { - pub fn builtins() -> Vec { + pub fn builtins() -> Vec { vec![#(#builtins),*] } }); -- cgit 1.4.1