diff options
Diffstat (limited to 'tvix/nix-compat-derive')
-rw-r--r-- | tvix/nix-compat-derive/src/de.rs | 7 | ||||
-rw-r--r-- | tvix/nix-compat-derive/src/internal/mod.rs | 2 | ||||
-rw-r--r-- | tvix/nix-compat-derive/src/lib.rs | 4 |
3 files changed, 8 insertions, 5 deletions
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<TokenStream> { +pub fn expand_nix_deserialize( + crate_path: Path, + input: &mut DeriveInput, +) -> syn::Result<TokenStream> { 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() } |