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 <v.kryachko@gmail.com> Autosubmit: Brian Olsen <me@griff.name> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
685f25ebff
commit
37a7bfa163
3 changed files with 8 additions and 5 deletions
|
@ -7,9 +7,12 @@ use crate::internal::attrs::Default;
|
||||||
use crate::internal::inputs::RemoteInput;
|
use crate::internal::inputs::RemoteInput;
|
||||||
use crate::internal::{attrs, Container, Context, Data, Field, Remote, Style, Variant};
|
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 cx = Context::new();
|
||||||
let cont = Container::from_ast(&cx, nnixrs, input);
|
let cont = Container::from_ast(&cx, crate_path, input);
|
||||||
cx.check()?;
|
cx.check()?;
|
||||||
let cont = cont.unwrap();
|
let cont = cont.unwrap();
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ impl<'a> Container<'a> {
|
||||||
Data::Enum(variants)
|
Data::Enum(variants)
|
||||||
}
|
}
|
||||||
syn::Data::Union(u) => {
|
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;
|
return None;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -264,8 +264,8 @@ mod internal;
|
||||||
#[proc_macro_derive(NixDeserialize, attributes(nix))]
|
#[proc_macro_derive(NixDeserialize, attributes(nix))]
|
||||||
pub fn derive_nix_deserialize(item: TokenStream) -> TokenStream {
|
pub fn derive_nix_deserialize(item: TokenStream) -> TokenStream {
|
||||||
let mut input = syn::parse_macro_input!(item as DeriveInput);
|
let mut input = syn::parse_macro_input!(item as DeriveInput);
|
||||||
let nnixrs: syn::Path = parse_quote!(::nix_compat);
|
let crate_path: syn::Path = parse_quote!(::nix_compat);
|
||||||
de::expand_nix_deserialize(nnixrs, &mut input)
|
de::expand_nix_deserialize(crate_path, &mut input)
|
||||||
.unwrap_or_else(syn::Error::into_compile_error)
|
.unwrap_or_else(syn::Error::into_compile_error)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue