Home
last modified time | relevance | path

Searched refs:quote_spanned (Results 1 – 23 of 23) sorted by relevance

/external/rust/cxx/macro/src/
Dderive.rs3 use quote::{quote, quote_spanned, ToTokens};
18 Trait::Eq => traits.push(quote_spanned!(span=> ::std::cmp::Eq)), in expand_struct()
20 Trait::Hash => traits.push(quote_spanned!(span=> ::std::hash::Hash)), in expand_struct()
22 Trait::PartialEq => traits.push(quote_spanned!(span=> ::std::cmp::PartialEq)), in expand_struct()
58 traits.push(quote_spanned!(span=> ::std::cmp::Eq)); in expand_enum()
62 Trait::Hash => traits.push(quote_spanned!(span=> ::std::hash::Hash)), in expand_enum()
65 traits.push(quote_spanned!(span=> ::std::cmp::PartialEq)); in expand_enum()
97 quote_spanned! {span=> in struct_copy()
114 quote_spanned!(span=> &self.#ident) in struct_clone()
116 quote_spanned!(span=> #ident { in struct_clone()
[all …]
Dexpand.rs15 use quote::{format_ident, quote, quote_spanned, ToTokens};
128 let expanded = quote_spanned!(span=> {#expanded}); in expand()
159 let struct_def = quote_spanned! {span=> in expand_struct()
192 operators.extend(quote_spanned! {span=> in expand_struct_operators()
203 operators.extend(quote_spanned! {span=> in expand_struct_operators()
215 operators.extend(quote_spanned! {span=> in expand_struct_operators()
225 operators.extend(quote_spanned! {span=> in expand_struct_operators()
236 operators.extend(quote_spanned! {span=> in expand_struct_operators()
246 operators.extend(quote_spanned! {span=> in expand_struct_operators()
258 operators.extend(quote_spanned! {span=> in expand_struct_operators()
[all …]
/external/rust/crates/structopt-derive/src/
Dlib.rs34 use quote::{format_ident, quote, quote_spanned};
85 quote_spanned! { kind.span()=> in gen_augmentation()
129 Some(quote_spanned! { kind.span()=> in gen_augmentation()
153 ParserKind::TryFromStr => quote_spanned! { func.span()=> in gen_augmentation()
160 ParserKind::TryFromOsStr => quote_spanned! { func.span()=> in gen_augmentation()
167 Ty::Bool => quote_spanned! { ty.span()=> in gen_augmentation()
172 Ty::Option => quote_spanned! { ty.span()=> in gen_augmentation()
178 Ty::OptionOption => quote_spanned! { ty.span()=> in gen_augmentation()
186 Ty::OptionVec => quote_spanned! { ty.span()=> in gen_augmentation()
193 Ty::Vec => quote_spanned! { ty.span()=> in gen_augmentation()
[all …]
Dattrs.rs17 use quote::{quote, quote_spanned, ToTokens};
138 let func = quote_spanned!(span=> ::std::str::FromStr::from_str); in default_spanned()
158 quote_spanned!(spec.kind.span()=> ::std::convert::From::from) in from_spec()
160 TryFromStr => quote_spanned!(spec.kind.span()=> ::std::str::FromStr::from_str), in from_spec()
165 FromOccurrences => quote_spanned!(spec.kind.span()=> { |v| v as _ }), in from_spec()
166 FromFlag => quote_spanned!(spec.kind.span()=> ::std::convert::From::from), in from_spec()
220 quote_spanned!(ident.span()=> #s) in translate()
322 quote_spanned!(ident.span()=> { in push_attrs()
/external/rust/crates/thiserror-impl/src/
Dexpand.rs3 use quote::{format_ident, quote, quote_spanned, ToTokens};
28 Some(quote_spanned!(source.span()=> .as_ref()?)) in impl_struct()
32 let dyn_error = quote_spanned!(source.span()=> self.#source #asref.as_dyn_error()); in impl_struct()
53 quote_spanned! {source.span()=> in impl_struct()
57 quote_spanned! {source.span()=> in impl_struct()
170 Some(quote_spanned!(source.span()=> .as_ref()?)) in impl_enum()
175 let dyn_error = quote_spanned!(source.span()=> #varsource #asref.as_dyn_error()); in impl_enum()
209 quote_spanned! {source.span()=> in impl_enum()
213 quote_spanned! {source.span()=> in impl_enum()
413 let path = quote_spanned!(first_span=> std::error::); in spanned_error_trait()
[all …]
Dfmt.rs4 use quote::{format_ident, quote_spanned};
82 args.extend(quote_spanned!(span=> ,)); in expand_shorthand()
84 args.extend(quote_spanned!(span=> #formatvar = #local)); in expand_shorthand()
87 args.extend(quote_spanned!(span=> .as_display())); in expand_shorthand()
/external/rust/cxx/syntax/
Dtokens.rs7 use quote::{quote_spanned, ToTokens};
16 tokens.extend(quote_spanned!(span=> ::std::os::raw::)); in to_tokens()
19 tokens.extend(quote_spanned!(span=> ::cxx::)); in to_tokens()
33 Type::Void(span) => tokens.extend(quote_spanned!(*span=> ())), in to_tokens()
65 tokens.extend(quote_spanned!(span=> ::cxx::)); in to_tokens()
68 tokens.extend(quote_spanned!(span=> ::std::vec::)); in to_tokens()
91 tokens.extend(quote_spanned!(pin.span=> ::std::pin::Pin)); in to_tokens()
319 tokens.extend(quote_spanned!(pin.span=> ::std::pin::Pin)); in to_tokens()
346 tokens.extend(quote_spanned!(pin.span=> ::std::pin::Pin)); in to_tokens()
Dparse.rs12 use quote::{format_ident, quote, quote_spanned};
231 let span = quote_spanned!(brace_token.span=> #enum_token {}); in parse_enum()
/external/rust/cxx/gen/src/
Dcheck.rs4 use quote::{quote, quote_spanned};
20 let begin = quote_spanned!(include.begin_span=> .); in check_dot_includes()
21 let end = quote_spanned!(include.end_span=> .); in check_dot_includes()
/external/rust/crates/quote/tests/ui/
Dwrong-type-span.rs1 use quote::quote_spanned;
6 quote_spanned!(span=> #x); in main()
/external/rust/crates/async-trait/src/
Dexpand.rs5 use quote::{format_ident, quote, quote_spanned, ToTokens};
17 syn::parse2(quote_spanned!($span=> $($t)*)).unwrap()
283 quote_spanned!(ret_span=> 'async_trait) in transform_sig()
285 quote_spanned!(ret_span=> ::core::marker::Send + 'async_trait) in transform_sig()
361 ReturnType::Default => quote_spanned! {block.brace_token.span=> in transform_block()
373 quote_spanned! {block.brace_token.span=> in transform_block()
385 let box_pin = quote_spanned!(block.brace_token.span=> in transform_block()
/external/rust/crates/serde_derive/src/
Dser.rs205 quote_spanned!(span=> _serde::Serialize::serialize) in serialize_transparent()
251 let func = quote_spanned!(span=> _serde::Serializer::serialize_newtype_struct); in serialize_newtype_struct()
538 let func = quote_spanned!(span=> _serde::Serializer::serialize_newtype_variant); in serialize_externally_tagged_variant()
614 let func = quote_spanned!(span=> _serde::__private::ser::serialize_tagged_newtype); in serialize_internally_tagged_variant()
671 let func = quote_spanned!(span=> _serde::ser::SerializeStruct::serialize_field); in serialize_adjacently_tagged_variant()
776 let func = quote_spanned!(span=> _serde::Serialize::serialize); in serialize_untagged_variant()
1118 let func = quote_spanned!(span=> _serde::Serialize::serialize); in serialize_struct_visitor()
1294 quote_spanned!(span=> _serde::ser::SerializeMap::serialize_entry) in serialize_field()
1297 quote_spanned!(span=> _serde::ser::SerializeStruct::serialize_field) in serialize_field()
1300 quote_spanned!(span=> _serde::ser::SerializeStructVariant::serialize_field) in serialize_field()
[all …]
Dde.rs363 quote_spanned!(span=> _serde::Deserialize::deserialize) in deserialize_transparent()
658 quote_spanned!(span=> _serde::de::SeqAccess::next_element::<#field_ty>); in deserialize_seq()
833 let func = quote_spanned!(span=> <#field_ty as _serde::Deserialize>::deserialize); in deserialize_newtype_struct()
1417 let func = quote_spanned!(span=> _serde::__private::de::missing_field); in deserialize_adjacently_tagged_enum()
1857 quote_spanned!(span=> _serde::de::VariantAccess::newtype_variant::<#field_ty>); in deserialize_externally_tagged_newtype_variant()
1885 let func = quote_spanned!(span=> <#field_ty as _serde::Deserialize>::deserialize); in deserialize_untagged_newtype_variant()
2476 quote_spanned!(span=> _serde::de::MapAccess::next_value::<#field_ty>); in deserialize_map()
2563 quote_spanned!(span=> _serde::de::Deserialize::deserialize) in deserialize_map()
2930 let func = quote_spanned!(span=> _serde::__private::Default::default); in expr_is_missing()
2951 let func = quote_spanned!(span=> _serde::__private::de::missing_field); in expr_is_missing()
/external/rust/crates/proc-macro-error-attr/src/
Dlib.rs10 use quote::{quote, quote_spanned};
32 quote_spanned!(self.span=> compile_error!{#message}) in into_compile_error()
/external/rust/crates/proc-macro-error/src/
Ddiagnostic.rs5 use quote::{quote_spanned, ToTokens};
257 let group = quote_spanned!(span_range.last=> { #msg } ); in to_tokens()
258 quote_spanned!(span_range.first=> compile_error!#group) in to_tokens()
/external/vm_tools/p9/wire_format_derive/
Dwire_format_derive.rs80 quote_spanned! {span=> in byte_size_sum()
103 quote_spanned! {span=> in encode_wire_format()
128 quote_spanned! {span=> in decode_wire_format()
/external/crosvm/bit_field/bit_field_derive/
Dbit_field_derive.rs10 use quote::{quote, quote_spanned};
105 let from_u64 = quote_spanned! { in bitfield_tuple_struct_impl()
109 let into_u64 = quote_spanned! { in bitfield_tuple_struct_impl()
285 let assertion = quote_spanned! {span=> in get_declare_discriminants_for_enum()
474 quote_spanned! {span=> in get_fields_impl()
/external/rust/crates/pin-project-internal/src/
Dutils.rs4 use quote::{quote, quote_spanned, ToTokens};
29 syn::parse2(quote::quote_spanned!($span => $($tt)*)).unwrap_or_else(|e| panic!("{}", e))
262 out.extend(quote_spanned!(span=> <#self_ty>)) in visit_token_stream()
/external/rust/crates/pin-project-internal/src/pin_project/
Dderive.rs2 use quote::{format_ident, quote, quote_spanned, ToTokens};
684 quote_spanned! { span => in make_unpin_impl()
708 quote_spanned! { span => in make_unpin_impl()
838 quote_spanned! { span => in make_drop_impl()
949 let sig = quote_spanned! { span => in make_proj_impl()
/external/rust/crates/quote/tests/
Dtest.rs7 use quote::{format_ident, quote, quote_spanned, TokenStreamExt};
41 let tokens = quote_spanned! {span=> in test_quote_spanned_impl()
/external/rust/crates/quote/src/
Dlib.rs586 macro_rules! quote_spanned { macro
1062 $crate::quote_spanned!($span=> $($inner)*),
1071 $crate::quote_spanned!($span=> $($inner)*),
1080 $crate::quote_spanned!($span=> $($inner)*),
/external/rust/crates/quote/
DREADME.md226 A different span can be provided explicitly through the [`quote_spanned!`]
229 [`quote_spanned!`]: https://docs.rs/quote/1.0/quote/macro.quote_spanned.html
/external/rust/crates/structopt/
DCHANGELOG.md25 due to `quote_spanned` misuse.