xref: /linux/rust/pin-init/internal/src/lib.rs (revision d7659acca7a390b5830f0b67f3aa4a5f9929ab79)
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
2 
3 // When fixdep scans this, it will find this string `CONFIG_RUSTC_VERSION_TEXT`
4 // and thus add a dependency on `include/config/RUSTC_VERSION_TEXT`, which is
5 // touched by Kconfig when the version string from the compiler changes.
6 
7 #[allow(missing_docs)]
8 #[proc_macro_attribute]
9 pub fn pin_data(inner: TokenStream, item: TokenStream) -> TokenStream {
10     pin_data::pin_data(inner, item)
11 }
12 
13 #[allow(missing_docs)]
14 #[proc_macro_attribute]
15 pub fn pinned_drop(args: TokenStream, input: TokenStream) -> TokenStream {
16     pinned_drop::pinned_drop(args, input)
17 }
18 
19 #[allow(missing_docs)]
20 #[proc_macro_derive(Zeroable)]
21 pub fn derive_zeroable(input: TokenStream) -> TokenStream {
22     zeroable::derive(input)
23 }
24