Mercurial > crates > nonstick
diff libpam-sys/libpam-sys-test/build.rs @ 148:4b3a5095f68c
Move libpam-sys helpers into their own library.
- Renames libpam-sys-helpers to libpam-sys-consts.
- Moves libpam-sys-helpers::helpers into libpam-sys-helpers,
which moves them completely out of libpam-sys's dependency chain.
- Moves the aliases from libpam-sys into libpam-sys::aliases.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Mon, 07 Jul 2025 12:11:43 -0400 |
parents | 33b9622ed6d2 |
children | 3a7cf05d2b5f |
line wrap: on
line diff
--- a/libpam-sys/libpam-sys-test/build.rs Sun Jul 06 19:23:02 2025 -0400 +++ b/libpam-sys/libpam-sys-test/build.rs Mon Jul 07 12:11:43 2025 -0400 @@ -1,6 +1,6 @@ use bindgen::MacroTypeVariation; -use libpam_sys_helpers::pam_impl::PamImpl; -use libpam_sys_helpers::{pam_impl, pam_impl_name}; +use libpam_sys_consts::pam_impl::PamImpl; +use libpam_sys_consts::{pam_impl, pam_impl_name}; use proc_macro2::{Group, Ident, TokenStream, TokenTree}; use quote::{format_ident, ToTokens}; use std::path::Path; @@ -184,12 +184,15 @@ TokenTree::Group(Group::new(g.delimiter(), deconstify(g.stream(), mut_token))) .into_token_stream() } + // Remove all 'consts' from the file and replace them with 'mut'. TokenTree::Ident(id) if id == "const" => mut_token.into_token_stream(), other => other.into_token_stream(), } })) } +enum ItemOr {} + fn test_file(name: impl AsRef<str>) -> String { format!("{}/{}", env::var("OUT_DIR").unwrap(), name.as_ref()) }