chore: add vendor dependencies for kauma build
This commit is contained in:
parent
7c94e5d8fb
commit
067ef6141c
1758 changed files with 398473 additions and 0 deletions
32
vendor/openssl-macros/src/lib.rs
vendored
Normal file
32
vendor/openssl-macros/src/lib.rs
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
use proc_macro2::Ident;
|
||||
use quote::quote;
|
||||
use syn::{parse_macro_input, ItemFn};
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn corresponds(attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
let function = parse_macro_input!(attr as Ident);
|
||||
let item = parse_macro_input!(item as ItemFn);
|
||||
|
||||
let function = function.to_string();
|
||||
let line = format!(
|
||||
"This corresponds to [`{0}`](https://www.openssl.org/docs/manmaster/man3/{0}.html).",
|
||||
function
|
||||
);
|
||||
|
||||
let attrs = item.attrs;
|
||||
let vis = item.vis;
|
||||
let sig = item.sig;
|
||||
let block = item.block;
|
||||
|
||||
let out = quote! {
|
||||
#(#attrs)*
|
||||
#[doc = ""]
|
||||
#[doc = #line]
|
||||
#[doc(alias = #function)]
|
||||
#vis #sig #block
|
||||
};
|
||||
out.into()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue