Home
last modified time | relevance | path

Searched refs:DeriveInput (Results 1 – 25 of 36) sorted by relevance

12

/external/rust/crates/syn/tests/
Dtest_derive_input.rs5 use syn::{Data, DeriveInput};
13 snapshot!(input as DeriveInput, @r###" in test_unit()
36 snapshot!(input as DeriveInput, @r###" in test_struct()
148 snapshot!(input as DeriveInput, @r###" in test_union()
209 snapshot!(input as DeriveInput, @r###" in test_enum()
363 snapshot!(input as DeriveInput, @r###" in test_attr_with_path()
404 snapshot!(input as DeriveInput, @r###" in test_attr_with_non_mod_style_path()
440 snapshot!(input as DeriveInput, @r###" in test_attr_with_mod_style_path_with_self()
493 snapshot!(input as DeriveInput, @r###" in test_pub_restricted()
552 snapshot!(input as DeriveInput, @r###" in test_vis_crate()
[all …]
Dtest_generics.rs5 use syn::{DeriveInput, ItemFn, TypeParamBound, WhereClause, WherePredicate};
13 snapshot!(input as DeriveInput, @r###" in test_split_for_impl()
Dtest_visibility.rs7 use syn::{DeriveInput, Result, Visibility};
129 snapshot!(tokens as DeriveInput, @r###" in test_empty_group_vis()
/external/rust/crates/thiserror-impl/src/
Dast.rs4 Data, DataEnum, DataStruct, DeriveInput, Error, Fields, Generics, Ident, Index, Member, Result,
14 pub original: &'a DeriveInput,
22 pub original: &'a DeriveInput,
44 pub fn from_syn(node: &'a DeriveInput) -> Result<Self> { in from_syn()
57 fn from_syn(node: &'a DeriveInput, data: &'a DataStruct) -> Result<Self> { in from_syn() argument
75 fn from_syn(node: &'a DeriveInput, data: &'a DataEnum) -> Result<Self> { in from_syn() argument
Dlib.rs22 use syn::{parse_macro_input, DeriveInput};
26 let input = parse_macro_input!(input as DeriveInput); in derive_error()
Dexpand.rs5 use syn::{Data, DeriveInput, Member, PathArguments, Result, Type, Visibility};
7 pub fn derive(node: &DeriveInput) -> Result<TokenStream> { in derive()
399 fn spanned_error_trait(input: &DeriveInput) -> TokenStream { in spanned_error_trait()
/external/vm_tools/p9/wire_format_derive/
Dwire_format_derive.rs22 use syn::{Data, DeriveInput, Fields, Ident};
27 let input = parse_macro_input!(input as DeriveInput); in p9_wire_format()
31 fn p9_wire_format_inner(input: DeriveInput) -> TokenStream { in p9_wire_format_inner()
161 let input: DeriveInput = parse_quote! { in byte_size()
181 let input: DeriveInput = parse_quote! { in encode()
204 let input: DeriveInput = parse_quote! { in decode()
232 let input: DeriveInput = parse_quote! { in end_to_end()
/external/rust/crates/syn/src/
Dderive.rs9 pub struct DeriveInput {
96 impl Parse for DeriveInput { implementation
107 Ok(DeriveInput { in parse()
126 Ok(DeriveInput { in parse()
145 Ok(DeriveInput { in parse()
232 impl ToTokens for DeriveInput { implementation
Ditem.rs2 use crate::derive::{Data, DataEnum, DataStruct, DataUnion, DeriveInput};
392 impl From<DeriveInput> for Item {
393 fn from(input: DeriveInput) -> Item { in from()
425 impl From<ItemStruct> for DeriveInput { implementation
426 fn from(input: ItemStruct) -> DeriveInput { in from() argument
427 DeriveInput { in from()
441 impl From<ItemEnum> for DeriveInput { implementation
442 fn from(input: ItemEnum) -> DeriveInput { in from() argument
443 DeriveInput { in from()
457 impl From<ItemUnion> for DeriveInput { implementation
[all …]
Dlib.rs400 pub use crate::derive::{Data, DataEnum, DataStruct, DataUnion, DeriveInput};
/external/crosvm/enumn/src/
Dtests.rs6 use syn::{parse_quote, DeriveInput};
10 let input: DeriveInput = parse_quote! { in test_repr()
43 let input: DeriveInput = parse_quote! { in test_no_repr()
Dlib.rs112 use syn::{parse_macro_input, parse_quote, Data, DeriveInput, Fields, Meta, NestedMeta};
114 fn testable_derive(input: DeriveInput) -> proc_macro2::TokenStream { in testable_derive()
204 let input = parse_macro_input!(input as DeriveInput); in derive()
/external/rust/crates/serde_derive/src/
Dlib.rs67 use syn::DeriveInput;
82 let mut input = parse_macro_input!(input as DeriveInput); in derive_serialize()
90 let mut input = parse_macro_input!(input as DeriveInput); in derive_deserialize()
/external/crosvm/bit_field/bit_field_derive/
Dbit_field_derive.rs13 parse_macro_input, Attribute, Data, DataEnum, DeriveInput, Fields, FieldsNamed, FieldsUnnamed,
23 let derive_input = parse_macro_input!(input as DeriveInput); in bitfield()
39 fn bitfield_impl(ast: &DeriveInput) -> Result<TokenStream> { in bitfield_impl()
64 fn bitfield_tuple_struct_impl(ast: &DeriveInput, fields: &FieldsUnnamed) -> Result<TokenStream> { in bitfield_tuple_struct_impl() argument
136 fn bitfield_enum_impl(ast: &DeriveInput, data: &DataEnum) -> Result<TokenStream> { in bitfield_enum_impl() argument
146 ast: &DeriveInput, in bitfield_enum_with_width_impl() argument
218 fn bitfield_enum_without_width_impl(ast: &DeriveInput, data: &DataEnum) -> Result<TokenStream> { in bitfield_enum_without_width_impl() argument
272 ast: &DeriveInput, in get_declare_discriminants_for_enum() argument
323 fn bitfield_struct_impl(ast: &DeriveInput, fields: &FieldsNamed) -> Result<TokenStream> { in bitfield_struct_impl() argument
405 fn parse_remove_bits_attr(ast: &mut DeriveInput) -> Result<Option<u64>> { in parse_remove_bits_attr()
[all …]
/external/crosvm/sys_util/poll_token_derive/
Dpoll_token_derive.rs11 use syn::{parse_macro_input, Data, DeriveInput, Field, Fields, Index, Member, Variant};
126 fn poll_token_inner(input: DeriveInput) -> TokenStream { in poll_token_inner()
170 let input = parse_macro_input!(input as DeriveInput); in poll_token()
Dtests.rs6 use syn::{parse_quote, DeriveInput};
28 let input: DeriveInput = parse_quote! { in poll_token_e2e()
/external/rust/crates/num-derive/src/
Dlib.rs168 fn new(ast: &syn::DeriveInput) -> Self { in new()
253 let ast = parse!(input as syn::DeriveInput); in from_primitive()
427 let ast = parse!(input as syn::DeriveInput); in to_primitive()
564 let ast = parse!(input as syn::DeriveInput); in num_ops()
613 let ast = parse!(input as syn::DeriveInput); in num_cast()
636 let ast = parse!(input as syn::DeriveInput); in zero()
663 let ast = parse!(input as syn::DeriveInput); in one()
690 let ast = parse!(input as syn::DeriveInput); in num()
715 let ast = parse!(input as syn::DeriveInput); in float()
/external/rust/crates/derive_arbitrary/src/
Dlib.rs11 let input = syn::parse_macro_input!(tokens as syn::DeriveInput); in derive_arbitrary()
70 fn gen_arbitrary_method(input: &DeriveInput, lifetime: LifetimeDef) -> TokenStream { in gen_arbitrary_method() argument
160 fn gen_size_hint_method(input: &DeriveInput) -> TokenStream { in gen_size_hint_method()
/external/rust/crates/serde_derive/src/internals/
Dast.rs21 pub original: &'a syn::DeriveInput,
65 item: &'a syn::DeriveInput, in from_ast() argument
Dreceiver.rs7 parse_quote, Data, DeriveInput, Expr, ExprPath, GenericArgument, GenericParam, Generics, Macro,
11 pub fn replace_receiver(input: &mut DeriveInput) { in replace_receiver() argument
/external/adhd/cros_alsa/cros_alsa_derive/src/
Dcontrol.rs16 pub fn impl_control_ops(ast: &syn::DeriveInput) -> TokenStream { in impl_control_ops()
/external/rust/crates/syn/
DREADME.md21 - **Derives** — Of particular interest to derive macros is [`syn::DeriveInput`]
46 [`syn::DeriveInput`]: https://docs.rs/syn/1.0/syn/struct.DeriveInput.html
89 use syn::{parse_macro_input, DeriveInput};
94 let input = parse_macro_input!(input as DeriveInput);
/external/rust/crates/proc-macro-error/
DREADME.md76 use syn::{DeriveInput, parse_macro_input};
84 let input = parse_macro_input!(input as DeriveInput);
117 use syn::{spanned::Spanned, DeriveInput, ItemStruct, Fields, Attribute , parse_macro_input};
/external/rust/crates/structopt-derive/src/
Dlib.rs57 let input: DeriveInput = syn::parse(input).unwrap(); in structopt()
866 fn impl_structopt(input: &DeriveInput) -> TokenStream { in impl_structopt()
/external/rust/crates/pin-project-internal/src/pin_project/
Dderive.rs4 parse_quote, token, visit_mut::VisitMut, Attribute, Data, DataEnum, DeriveInput, Error, Field,
19 let mut input: DeriveInput = syn::parse2(input)?; in parse_derive()

12