blob: 2dce78f37fb39391a239a6d1d32257f9b70f658c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
mod args;
mod attribute;
mod derive;
use proc_macro2::TokenStream;
use syn::Error;
/// The annotation for pinned type.
const PIN: &str = "pin";
pub(crate) fn attribute(args: &TokenStream, input: TokenStream) -> TokenStream {
attribute::parse_attribute(args, input).unwrap_or_else(Error::into_compile_error)
}
pub(crate) fn derive(input: TokenStream) -> TokenStream {
derive::parse_derive(input).unwrap_or_else(Error::into_compile_error)
}
|