From 37a7bfa1636e42359675c6f4ede90b892c1da5bf Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Sun, 3 Nov 2024 20:28:34 +0100 Subject: chore(tvix/nix-compat-derive): Remove references to nixrs Some references to nixrs had sneaked in while writing the original CL so this just removes those. Change-Id: I635adbd2de46c7c1f31e1d449396253a78e1b762 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12727 Reviewed-by: Vladimir Kryachko Autosubmit: Brian Olsen Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/nix-compat-derive/src/de.rs | 7 +++++-- tvix/nix-compat-derive/src/internal/mod.rs | 2 +- tvix/nix-compat-derive/src/lib.rs | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'tvix/nix-compat-derive') diff --git a/tvix/nix-compat-derive/src/de.rs b/tvix/nix-compat-derive/src/de.rs index ee79ea9d1012..8dac6964f612 100644 --- a/tvix/nix-compat-derive/src/de.rs +++ b/tvix/nix-compat-derive/src/de.rs @@ -7,9 +7,12 @@ use crate::internal::attrs::Default; use crate::internal::inputs::RemoteInput; use crate::internal::{attrs, Container, Context, Data, Field, Remote, Style, Variant}; -pub fn expand_nix_deserialize(nnixrs: Path, input: &mut DeriveInput) -> syn::Result { +pub fn expand_nix_deserialize( + crate_path: Path, + input: &mut DeriveInput, +) -> syn::Result { let cx = Context::new(); - let cont = Container::from_ast(&cx, nnixrs, input); + let cont = Container::from_ast(&cx, crate_path, input); cx.check()?; let cont = cont.unwrap(); diff --git a/tvix/nix-compat-derive/src/internal/mod.rs b/tvix/nix-compat-derive/src/internal/mod.rs index 20b243221619..07ef43b6e0bb 100644 --- a/tvix/nix-compat-derive/src/internal/mod.rs +++ b/tvix/nix-compat-derive/src/internal/mod.rs @@ -113,7 +113,7 @@ impl<'a> Container<'a> { Data::Enum(variants) } syn::Data::Union(u) => { - ctx.error_spanned(u.union_token, "Union not supported by nixrs"); + ctx.error_spanned(u.union_token, "Union not supported by nix-compat"); return None; } }; diff --git a/tvix/nix-compat-derive/src/lib.rs b/tvix/nix-compat-derive/src/lib.rs index e3faed02ebab..89735cadf315 100644 --- a/tvix/nix-compat-derive/src/lib.rs +++ b/tvix/nix-compat-derive/src/lib.rs @@ -264,8 +264,8 @@ mod internal; #[proc_macro_derive(NixDeserialize, attributes(nix))] pub fn derive_nix_deserialize(item: TokenStream) -> TokenStream { let mut input = syn::parse_macro_input!(item as DeriveInput); - let nnixrs: syn::Path = parse_quote!(::nix_compat); - de::expand_nix_deserialize(nnixrs, &mut input) + let crate_path: syn::Path = parse_quote!(::nix_compat); + de::expand_nix_deserialize(crate_path, &mut input) .unwrap_or_else(syn::Error::into_compile_error) .into() } -- cgit 1.4.1