Home
last modified time | relevance | path

Searched refs:parse_quote (Results 1 – 21 of 21) sorted by relevance

/third_party/rust/crates/syn/tests/
Dtest_receiver.rs6 use syn::{parse_quote, TraitItemFn};
10 let TraitItemFn { sig, .. } = parse_quote! { in test_by_value()
31 let TraitItemFn { sig, .. } = parse_quote! { in test_by_mut_value()
53 let TraitItemFn { sig, .. } = parse_quote! { in test_by_ref()
76 let TraitItemFn { sig, .. } = parse_quote! { in test_by_box()
110 let TraitItemFn { sig, .. } = parse_quote! { in test_by_pin()
144 let TraitItemFn { sig, .. } = parse_quote! { in test_explicit_type()
178 let TraitItemFn { sig, .. } = parse_quote! { in test_value_shorthand()
198 let TraitItemFn { sig, .. } = parse_quote! { in test_mut_value_shorthand()
219 let TraitItemFn { sig, .. } = parse_quote! { in test_ref_shorthand()
[all …]
Dtest_parse_quote.rs5 use syn::{parse_quote, Attribute, Field, Lit, Pat, Stmt, Token};
9 let attr: Attribute = parse_quote!(#[test]); in test_attribute()
23 let attr: Attribute = parse_quote!(#![no_std]); in test_attribute()
40 let field: Field = parse_quote!(pub enabled: bool); in test_field()
58 let field: Field = parse_quote!(primitive::bool); in test_field()
81 let pat: Pat = parse_quote!(Some(false) | None); in test_pat()
109 let boxed_pat: Box<Pat> = parse_quote!(Some(false) | None); in test_pat()
115 let punctuated: Punctuated<Lit, Token![|]> = parse_quote!(true | true); in test_punctuated()
128 let punctuated: Punctuated<Lit, Token![|]> = parse_quote!(true | true |); in test_punctuated()
145 let stmts: Vec<Stmt> = parse_quote! { in test_vec_stmt()
Dtest_path.rs8 use syn::{parse_quote, Expr, Type, TypePath};
56 let mut ty: TypePath = parse_quote!(<Self as A>::Q); in print_incomplete_qpath()
71 let mut ty: TypePath = parse_quote!(<Self>::A::B); in print_incomplete_qpath()
86 let mut ty: TypePath = parse_quote!(Self::A::B); in print_incomplete_qpath()
Dtest_pat.rs10 use syn::{parse_quote, token, Item, Pat, PatTuple, Stmt, Token};
109 expr.elems.push_value(parse_quote!(_)); in test_tuple_comma()
130 expr.elems.push_value(parse_quote!(_)); in test_tuple_comma()
Dtest_ty.rs9 use syn::{parse_quote, token, Token, Type, TypeTuple};
354 expr.elems.push_value(parse_quote!(_)); in test_tuple_comma()
375 expr.elems.push_value(parse_quote!(_)); in test_tuple_comma()
Dtest_expr.rs9 use syn::{parse_quote, token, Expr, ExprRange, ExprTuple, Stmt, Token};
497 expr.elems.push_value(parse_quote!(continue)); in test_tuple_comma()
518 expr.elems.push_value(parse_quote!(continue)); in test_tuple_comma()
/third_party/rust/crates/syn/src/
Dparse_quote.rs69 macro_rules! parse_quote { macro
71 $crate::__private::parse_quote($crate::__private::quote::quote!($($tt)*))
103 $crate::__private::parse_quote($crate::__private::quote::quote_spanned!($span=> $($tt)*))
Dexport.rs50 pub use crate::parse_quote::parse as parse_quote;
Dlib.rs452 mod parse_quote; module
/third_party/rust/crates/syn/examples/trace-var/trace-var/src/
Dlib.rs7 use syn::{parse_macro_input, parse_quote, BinOp, Expr, Ident, ItemFn, Local, Pat, Stmt, Token};
71 parse_quote!({ in assign_and_print()
92 parse_quote! { in let_and_print()
/third_party/rust/crates/syn/examples/heapsize/heapsize_derive/src/
Dlib.rs5 parse_macro_input, parse_quote, Data, DeriveInput, Fields, GenericParam, Generics, Index,
40 type_param.bounds.push(parse_quote!(heapsize::HeapSize)); in add_trait_bounds()
/third_party/rust/crates/syn/codegen/src/
Dparse.rs10 parse_quote, Attribute, Data, DataEnum, DataStruct, DeriveInput, Fields, GenericArgument,
283 braced, bracketed, parenthesized, parse_quote, token, Attribute, Expr, Ident, Lit, LitStr,
303 vec![parse_quote!(#[cfg(feature = "full")])] in full()
393 parse_quote! { in ast_enum_of_structs()
483 features.iter().map(|attr| parse_quote!(#attr)).collect() in clone_features()
491 ret.push(parse_quote!(#attr)); in get_features()
563 vec![parse_quote!(#[cfg(feature = "derive")])] in do_load_file()
/third_party/rust/crates/syn/tests/macros/
Dmod.rs40 let $expr: $t = syn::parse_quote!(#tokens);
51 let syntax_tree: $t = syn::parse_quote!(#tokens);
/third_party/rust/crates/nom/examples/
Ds_expression.rs221 fn parse_quote<'a>(i: &'a str) -> IResult<&'a str, Expr, VerboseError<&'a str>> { in parse_quote() function
236 alt((parse_constant, parse_application, parse_if, parse_quote)), in parse_expr()
/third_party/rust/crates/cxx/macro/src/
Dload.rs17 use syn::{parse_quote, Path};
268 parse_quote!(#path) in translate_qual_type()
Dexpand.rs18 use syn::{parse_quote, punctuated, Generics, Lifetime, Result, Token};
787 let local_name = parse_quote!(__); in expand_function_pointer_trampoline()
/third_party/rust/crates/serde/serde_derive/src/internals/
Dreceiver.rs7 parse_quote, Data, DeriveInput, Expr, ExprPath, GenericArgument, GenericParam, Generics, Macro,
15 parse_quote!(#ident #ty_generics) in replace_receiver()
Dattr.rs11 use syn::{parse_quote, token, Ident, Lifetime, Token};
672 .map_or_else(|| Cow::Owned(parse_quote!(_serde)), Cow::Borrowed) in serde_path()
/third_party/rust/crates/serde/serde_derive/src/
Dser.rs8 use syn::{parse_quote, Ident, Index, Member};
145 &parse_quote!(_serde::Serialize), in build_generics()
Dde.rs11 use syn::{parse_quote, Ident, Index, Member};
175 &parse_quote!(_serde::__private::Default), in build_generics()
185 &parse_quote!(_serde::Deserialize<#delife>), in build_generics()
192 &parse_quote!(_serde::__private::Default), in build_generics()
/third_party/alsa-lib/src/alisp/
Dalisp.c770 static inline struct alisp_object * parse_quote(struct alisp_instance *instance) in parse_quote() function
792 p = parse_quote(instance); in parse_object()