/third_party/rust/crates/quote/tests/ |
D | test.rs | 12 use quote::{format_ident, quote, quote_spanned, TokenStreamExt}; 16 impl quote::ToTokens for X { 24 let tokens = quote! { in test_quote_impl() 68 let tokens = quote!(#x <#x> (#x) [#x] {#x}); in test_substitution() 79 assert_eq!("X X X X", quote!(#(#primes)*).to_string()); in test_iter() 81 assert_eq!("X , X , X , X ,", quote!(#(#primes,)*).to_string()); in test_iter() 83 assert_eq!("X , X , X , X", quote!(#(#primes),*).to_string()); in test_iter() 89 let _ = quote!(#(#array #array)*); in test_array() 92 let _ = quote!(#(#ref_array #ref_array)*); in test_array() 95 let _ = quote!(#(#ref_slice #ref_slice)*); in test_array() [all …]
|
/third_party/rust/crates/bindgen/bindgen/codegen/ |
D | helpers.rs | 6 use quote::TokenStreamExt; 14 quote! { in repr() 24 quote! { in repr_list() 34 quote! { in derives() 40 quote! { in inline() 46 quote! { in must_use() 52 quote! { in non_exhaustive() 59 quote!() in doc() 61 quote!(#[doc = #comment]) in doc() 69 quote! { in link_name() [all …]
|
D | dyngen.rs | 87 quote!(unsafe { Self::from_library(library) }) in get_tokens() 89 quote!(Self::from_library(library)) in get_tokens() 92 quote! { in get_tokens() 144 let signature = quote! { unsafe extern #abi fn ( #( #args),* ) #ret }; in push() 148 quote! { Result<#signature, ::libloading::Error> } in push() 151 self.struct_members.push(quote! { in push() 158 quote! { self.#ident } in push() 160 quote! { self.#ident.as_ref().expect("Expected function, got error.") } in push() 163 quote!(unsafe { (#fn_)(#( #args_identifiers ),*) }) in push() 165 quote!((#fn_)(#( #args_identifiers ),*) ) in push() [all …]
|
D | mod.rs | 52 use quote::TokenStreamExt; 93 let mut path = vec![quote! { self }]; in top_level_path() 97 path.push(quote! { super }); in top_level_path() 115 path.push(quote! { #root_ident }); in root_import() 117 let mut tokens = quote! {}; in root_import() 118 tokens.append_separated(path, quote!(::)); in root_import() 120 quote! { in root_import() 390 quote! { *const #self } in to_ptr() 392 quote! { *mut #self } in to_ptr() 451 self.append_all(quote! { in append_implicit_template_params() [all …]
|
/third_party/rust/crates/syn/codegen/src/ |
D | fold.rs | 4 use quote::{format_ident, quote}; 13 quote! { in simple_visit() 26 let res = visit(t, features, defs, "e!(*#name))?; in visit() 27 Some(quote! { in visit() 32 let operand = quote!(it); in visit() 34 Some(quote! { in visit() 39 let operand = quote!(it); in visit() 41 Some(quote! { in visit() 46 let it = quote!(it); in visit() 48 Some(quote! { in visit() [all …]
|
D | snapshot.rs | 4 use quote::{format_ident, quote}; 14 quote!(syn::#ident) in rust_type() 18 quote!(#ident) in rust_type() 22 quote!(proc_macro2::#ident) in rust_type() 26 quote!(syn::token::#ident) in rust_type() 31 quote!(syn::punctuated::Punctuated<#element, #punct>) in rust_type() 35 quote!(Option<#inner>) in rust_type() 39 quote!(Box<#inner>) in rust_type() 43 quote!(Vec<#inner>) in rust_type() 47 quote!((#(#inner,)*)) in rust_type() [all …]
|
D | visit.rs | 5 use quote::{format_ident, quote}; 15 quote! { in simple_visit() 22 quote! { in noop_visit() 36 visit(t, features, defs, &Owned(quote!(*#name))) in visit() 39 let operand = Borrowed(quote!(it)); in visit() 42 Some(quote! { in visit() 49 let operand = Borrowed(quote!(it)); in visit() 52 Some(quote! { in visit() 63 let it = Borrowed(quote!(it)); in visit() 66 Some(quote! { in visit() [all …]
|
D | visit_mut.rs | 5 use quote::{format_ident, quote}; 15 quote! { in simple_visit() 22 quote! { in noop_visit() 36 visit(t, features, defs, &Owned(quote!(*#name))) in visit() 39 let operand = Borrowed(quote!(it)); in visit() 42 Some(quote! { in visit() 49 let operand = Borrowed(quote!(it)); in visit() 52 Some(quote! { in visit() 63 let it = Borrowed(quote!(it)); in visit() 66 Some(quote! { in visit() [all …]
|
D | hash.rs | 4 use quote::{format_ident, quote}; 33 quote! { in expand_impl_body() 47 let mut hashed_val = quote!(#var); in expand_impl_body() 50 hashed_val = quote!(TokenStreamHelper(#hashed_val)); in expand_impl_body() 53 hashed_val = quote!(#hashed_val.to_string()); in expand_impl_body() 57 hashes.push(quote! { in expand_impl_body() 66 cfg = Some(quote!(#[cfg(feature = "full")])); in expand_impl_body() 70 quote! { in expand_impl_body() 82 Some(quote! { in expand_impl_body() 87 Some(quote! { in expand_impl_body() [all …]
|
D | eq.rs | 4 use quote::{format_ident, quote}; 29 quote! { in expand_impl_body() 46 quote!(TokenStreamHelper(#this) == TokenStreamHelper(#other)) in expand_impl_body() 49 quote!(#this.to_string() == #other.to_string()) in expand_impl_body() 51 _ => quote!(#this == #other), in expand_impl_body() 57 comparisons.push(quote!(true)); in expand_impl_body() 63 cfg = Some(quote!(#[cfg(feature = "full")])); in expand_impl_body() 67 quote! { in expand_impl_body() 75 quote! { in expand_impl_body() 91 quote!(TokenStreamHelper(&self.#ident) == TokenStreamHelper(&other.#ident)) in expand_impl_body() [all …]
|
D | clone.rs | 4 use quote::{format_ident, quote}; 18 quote! { in expand_impl_body() 26 clones.push(quote!(#pat.clone())); in expand_impl_body() 33 cfg = Some(quote!(#[cfg(feature = "full")])); in expand_impl_body() 37 quote! { in expand_impl_body() 46 Some(quote! { in expand_impl_body() 51 Some(quote! { in expand_impl_body() 56 quote! { in expand_impl_body() 66 quote! { in expand_impl_body() 70 quote!(#ident { #(#fields)* }) in expand_impl_body() [all …]
|
D | debug.rs | 4 use quote::{format_ident, quote}; 18 quote! { in expand_impl_body() 29 cfg = Some(quote!(#[cfg(feature = "full")])); in expand_impl_body() 33 quote! { in expand_impl_body() 46 Some(quote! { in expand_impl_body() 51 Some(quote! { in expand_impl_body() 56 quote! { in expand_impl_body() 66 quote! { in expand_impl_body() 70 quote! { in expand_impl_body() 90 quote! { in expand_impl() [all …]
|
/third_party/rust/crates/syn/tests/ |
D | test_item.rs | 5 use quote::quote; 13 TokenTree::Group(Group::new(Delimiter::None, quote! { #[test] })), in test_macro_variable_attr() 53 let tokens = quote! { in test_negative_impl() 66 let tokens = quote! { in test_negative_impl() 78 let tokens = quote! { in test_negative_impl() 111 let tokens = quote! { in test_negative_impl() 127 TokenTree::Group(Group::new(Delimiter::None, quote!(Trait))), in test_macro_variable_impl() 129 TokenTree::Group(Group::new(Delimiter::None, quote!(Type))), in test_macro_variable_impl() 168 let tokens = quote!(trait Trait where {}); in test_supertraits() 180 let tokens = quote!(trait Trait: where {}); in test_supertraits() [all …]
|
D | test_derive_input.rs | 6 use quote::quote; 11 let input = quote! { in test_unit() 30 let input = quote! { in test_struct() 143 let input = quote! { in test_union() 197 let input = quote! { in test_enum() 359 let input = quote! { in test_attr_with_path() 401 let input = quote! { in test_attr_with_non_mod_style_path() 437 let input = quote! { in test_attr_with_mod_style_path_with_self() 491 let input = quote! { in test_pub_restricted() 550 let input = quote! { in test_vis_crate() [all …]
|
D | test_generics.rs | 6 use quote::quote; 11 let input = quote! { in test_split_for_impl() 105 let generated = quote! { in test_split_for_impl() 108 let expected = quote! { in test_split_for_impl() 118 let generated = quote! { in test_split_for_impl() 121 let expected = quote! { in test_split_for_impl() 129 let tokens = quote!('a); in test_ty_param_bound() 136 let tokens = quote!('_); in test_ty_param_bound() 143 let tokens = quote!(Debug); in test_ty_param_bound() 158 let tokens = quote!(?Sized); in test_ty_param_bound() [all …]
|
D | test_expr.rs | 5 use quote::quote; 11 let tokens = quote!(..100u32); in test_expr_parse() 21 let tokens = quote!(..100u32); in test_expr_parse() 35 let tokens = quote!(fut.await); in test_await() 90 quote!(tuple.0.0), in test_tuple_multi_index() 91 quote!(tuple .0.0), in test_tuple_multi_index() 92 quote!(tuple. 0.0), in test_tuple_multi_index() 93 quote!(tuple.0 .0), in test_tuple_multi_index() 94 quote!(tuple.0. 0), in test_tuple_multi_index() 95 quote!(tuple . 0 . 0), in test_tuple_multi_index() [all …]
|
D | test_ty.rs | 5 use quote::quote; 23 TokenTree::Group(Group::new(Delimiter::None, quote! { ty })), in test_macro_variable_type() 57 TokenTree::Group(Group::new(Delimiter::None, quote! { ty })), in test_macro_variable_type() 99 TokenTree::Group(Group::new(Delimiter::None, quote! { Vec<u8> })), in test_group_angle_brackets() 149 TokenTree::Group(Group::new(Delimiter::None, quote! { Vec<u8> })), in test_group_colons() 186 TokenTree::Group(Group::new(Delimiter::None, quote! { [T] })), in test_group_colons() 224 let tokens = quote!(dyn for<'a> Trait<'a> + 'static); in test_trait_object() 262 let tokens = quote!(dyn 'a + Trait); in test_trait_object() 293 let tokens = quote!(impl Trait +); in test_trailing_plus() 313 let tokens = quote!(dyn Trait +); in test_trailing_plus() [all …]
|
/third_party/rust/crates/clap/clap_derive/src/derives/ |
D | subcommand.rs | 17 use quote::{format_ident, quote, quote_spanned}; 71 quote! { in gen_for_enum() 159 quote!() in gen_augment() 182 quote!() in gen_augment() 187 quote! { in gen_augment() 195 quote! { in gen_augment() 217 Unit => quote!( #subcommand_var ), in gen_augment() 243 quote!() in gen_augment() 253 quote!() in gen_augment() 255 let subcommand = quote! { in gen_augment() [all …]
|
/third_party/rust/crates/serde/serde_derive/src/ |
D | de.rs | 2 use quote::ToTokens; 40 quote! { in expand_derive_deserialize() 54 quote! { in expand_derive_deserialize() 365 Some(path) => quote!(#path), in deserialize_transparent() 375 quote!(#member: __transparent) in deserialize_transparent() 378 attr::Default::Default => quote!(_serde::__private::Default::default()), in deserialize_transparent() 379 attr::Default::Path(path) => quote!(#path()), in deserialize_transparent() 380 attr::Default::None => quote!(_serde::__private::PhantomData), in deserialize_transparent() 382 quote!(#member: #value) in deserialize_transparent() 458 quote!(#local) in deserialize_tuple() [all …]
|
D | pretend.rs | 2 use quote::format_ident; 27 quote! { in pretend_used() 75 Data::Struct(_, _) => quote!(), in pretend_fields_used() 86 quote! { in pretend_fields_used_struct() 102 quote! { in pretend_fields_used_struct_packed() 118 quote! { in pretend_fields_used_struct_packed() 138 Some(quote!(#type_ident::#variant_ident { #(#members: #placeholders),* })) in pretend_fields_used_enum() 144 quote! { in pretend_fields_used_enum() 167 return quote!(); in pretend_variants_used() 184 quote!({ #(#members: #placeholders),* }) in pretend_variants_used() [all …]
|
D | ser.rs | 34 quote! { in expand_derive_serialize() 46 quote! { in expand_derive_serialize() 202 Some(path) => quote!(#path), in serialize_transparent() 277 None => quote!(1), in serialize_tuple_struct() 284 quote!(if #path(#field_expr) { 0 } else { 1 }) in serialize_tuple_struct() 287 .fold(quote!(0), |sum, expr| quote!(#sum + #expr)); in serialize_tuple_struct() 311 quote! { in serialize_struct_tag_field() 315 _ => quote! {}, in serialize_struct_tag_field() 341 None => quote!(1), in serialize_struct_as_struct() 344 quote!(if #path(#field_expr) { 0 } else { 1 }) in serialize_struct_as_struct() [all …]
|
/third_party/rust/crates/quote/ |
D | README.md | 4 …badge/github-dtolnay/quote-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">]… 5 …://img.shields.io/crates/v/quote.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](htt… 6 ….shields.io/badge/docs.rs-quote-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height=… 7 …ions/workflow/status/dtolnay/quote/ci.yml?branch=master&style=for-the-badge" height="20">](https:/… 9 This crate provides the [`quote!`] macro for turning Rust syntax tree data 12 [`quote!`]: https://docs.rs/quote/1.0/quote/macro.quote.html 21 Within the `quote!` macro, we can write what looks like code to our text editor 34 quote = "1.0" 38 [*Release notes*](https://github.com/dtolnay/quote/releases) 44 The quote crate provides a [`quote!`] macro within which you can write Rust code [all …]
|
/third_party/rust/crates/cxx/macro/src/ |
D | type_id.rs | 3 use quote::{format_ident, quote, ToTokens}; 14 Crate::Cxx => tokens.extend(quote!(::cxx)), in to_tokens() 26 ids.push(quote!(())); in expand() 32 quote!(#krate::#t) in expand() 36 quote!(#krate::#t) in expand() 38 _ => quote!([(); #ch as _]), in expand() 43 quote! { (#(#ids,)*) } in expand()
|
/third_party/rust/crates/clap/clap_derive/src/ |
D | dummies.rs | 5 use quote::quote; 10 append_dummy(quote!( impl clap::Parser for #name {} )); in parser_struct() 16 append_dummy(quote!( impl clap::Parser for #name {} )); in parser_enum() 20 append_dummy(quote! { in into_app() 33 append_dummy(quote! { in from_arg_matches() 47 append_dummy(quote! { in subcommand() 64 append_dummy(quote! { in args() 77 append_dummy(quote! { in value_enum()
|
/third_party/rust/crates/quote/benches/ |
D | README.md | 6 <i>Compiling quote v1.0.10</i> 7 <i>Compiling quote-benchmark v0.0.0</i> 10 <i>Running `/git/quote/target/debug/quote-benchmark`</i> 12 <i>Compiling quote v1.0.10</i> 13 <i>Compiling quote-benchmark v0.0.0</i> 16 <i>Running `/git/quote/target/release/quote-benchmark`</i>
|