Home
last modified time | relevance | path

Searched refs:generics (Results 1 – 25 of 80) sorted by relevance

1234

/third_party/rust/crates/serde/serde_derive/src/
Dbound.rs11 pub fn without_defaults(generics: &syn::Generics) -> syn::Generics { in without_defaults()
13 params: generics in without_defaults()
25 ..generics.clone() in without_defaults()
30 generics: &syn::Generics, in with_where_predicates()
33 let mut generics = generics.clone(); in with_where_predicates() localVariable
34 generics in with_where_predicates()
38 generics in with_where_predicates()
43 generics: &syn::Generics, in with_where_predicates_from_fields()
52 let mut generics = generics.clone(); in with_where_predicates_from_fields() localVariable
53 generics.make_where_clause().predicates.extend(predicates); in with_where_predicates_from_fields()
[all …]
Dde.rs89 for param in cont.generics.lifetimes() { in precondition_no_de_lifetime()
115 generics: syn::Generics, field
135 let generics = build_generics(cont, &borrowed); in new() localVariable
143 generics, in new()
161 let generics = bound::without_defaults(cont.generics); in build_generics() localVariable
163 let generics = bound::with_where_predicates_from_fields(cont, &generics, attr::Field::de_bound); in build_generics() localVariable
165 let generics = in build_generics() localVariable
166 bound::with_where_predicates_from_variants(cont, &generics, attr::Variant::de_bound); in build_generics()
169 Some(predicates) => bound::with_where_predicates(&generics, predicates), in build_generics()
171 let generics = match *cont.attrs.default() { in build_generics() localVariable
[all …]
Dser.rs23 let (impl_generics, ty_generics, where_clause) = params.generics.split_for_impl(); in expand_derive_serialize()
88 generics: syn::Generics, field
109 let generics = build_generics(cont); in new() localVariable
115 generics, in new()
131 let generics = bound::without_defaults(cont.generics); in build_generics() localVariable
133 let generics = in build_generics() localVariable
134 bound::with_where_predicates_from_fields(cont, &generics, attr::Field::ser_bound); in build_generics()
136 let generics = in build_generics() localVariable
137 bound::with_where_predicates_from_variants(cont, &generics, attr::Variant::ser_bound); in build_generics()
140 Some(predicates) => bound::with_where_predicates(&generics, predicates), in build_generics()
[all …]
Dpretend.rs80 let (_, ty_generics, _) = cont.generics.split_for_impl(); in pretend_fields_used_struct()
95 let (_, ty_generics, _) = cont.generics.split_for_impl(); in pretend_fields_used_struct_packed()
113 let (_, ty_generics, _) = cont.generics.split_for_impl(); in pretend_fields_used_enum()
156 let (_, ty_generics, _) = cont.generics.split_for_impl(); in pretend_variants_used()
/third_party/rust/crates/cxx/macro/src/
Dderive.rs99 let generics = &strct.generics; in struct_copy() localVariable
102 impl #generics ::cxx::core::marker::Copy for #ident #generics {} in struct_copy()
108 let generics = &strct.generics; in struct_clone() localVariable
127 impl #generics ::cxx::core::clone::Clone for #ident #generics { in struct_clone()
137 let generics = &strct.generics; in struct_debug() localVariable
143 impl #generics ::cxx::core::fmt::Debug for #ident #generics { in struct_debug()
155 let generics = &strct.generics; in struct_default() localVariable
160 impl #generics ::cxx::core::default::Default for #ident #generics { in struct_default()
174 let generics = &strct.generics; in struct_ord() localVariable
178 impl #generics ::cxx::core::cmp::Ord for #ident #generics { in struct_ord()
[all …]
Dexpand.rs14 use crate::{derive, generics};
158 let generics = &strct.generics; in expand_struct() localVariable
175 #visibility #struct_token #ident #generics { in expand_struct()
187 unsafe impl #generics ::cxx::ExternType for #ident #generics { in expand_struct()
200 let generics = &strct.generics; in expand_struct_operators() localVariable
213 … extern "C" fn #local_name #generics(lhs: &#ident #generics, rhs: &#ident #generics) -> bool { in expand_struct_operators()
226 … extern "C" fn #local_name #generics(lhs: &#ident #generics, rhs: &#ident #generics) -> bool { in expand_struct_operators()
240 … extern "C" fn #local_name #generics(lhs: &#ident #generics, rhs: &#ident #generics) -> bool { in expand_struct_operators()
252 … extern "C" fn #local_name #generics(lhs: &#ident #generics, rhs: &#ident #generics) -> bool { in expand_struct_operators()
265 … extern "C" fn #local_name #generics(lhs: &#ident #generics, rhs: &#ident #generics) -> bool { in expand_struct_operators()
[all …]
Dgenerics.rs41 self.resolve.generics.to_tokens(tokens); in to_tokens()
50 } else if !self.resolve.generics.lifetimes.is_empty() { in to_tokens()
56 self.resolve.generics.lifetimes.to_tokens(tokens); in to_tokens()
66 generics: &'a Lifetimes, field
71 UnderscoreLifetimes { generics: self } in to_underscore_lifetimes()
81 } = self.generics; in to_tokens()
/third_party/rust/crates/syn/src/
Dderive.rs11 pub generics: Generics,
76 let generics = input.parse::<Generics>()?; in parse() localVariable
82 generics: Generics { in parse()
84 ..generics in parse()
95 let generics = input.parse::<Generics>()?; in parse() localVariable
101 generics: Generics { in parse()
103 ..generics in parse()
114 let generics = input.parse::<Generics>()?; in parse() localVariable
120 generics: Generics { in parse()
122 ..generics in parse()
[all …]
Ditem.rs98 pub generics: Generics,
115 pub generics: Generics,
167 pub generics: Generics,
228 pub generics: Generics,
245 pub generics: Generics,
261 pub generics: Generics,
276 pub generics: Generics,
291 pub generics: Generics,
341 generics: input.generics, in from()
350 generics: input.generics, in from()
[all …]
Dpath.rs207 pub generics: Option<AngleBracketedGenericArguments>,
219 pub generics: Option<AngleBracketedGenericArguments>,
230 pub generics: Option<AngleBracketedGenericArguments>,
316 let generics = match segment.arguments { in parse() localVariable
324 generics, in parse()
331 generics, in parse()
343 generics: match segment.arguments { in parse()
791 self.generics.to_tokens(tokens); in to_tokens()
801 self.generics.to_tokens(tokens); in to_tokens()
811 self.generics.to_tokens(tokens); in to_tokens()
/third_party/rust/crates/clap/clap_derive/src/derives/
Dparser.rs47 gen_for_struct(&item, ident, &input.generics, &fields) in derive_parser()
63 gen_for_struct(&item, ident, &input.generics, &fields) in derive_parser()
77 gen_for_enum(&item, ident, &input.generics, &variants) in derive_parser()
86 generics: &Generics, in gen_for_struct()
89 let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); in gen_for_struct()
91 let into_app = into_app::gen_for_struct(item, item_name, generics)?; in gen_for_struct()
92 let args = args::gen_for_struct(item, item_name, generics, fields)?; in gen_for_struct()
105 generics: &Generics, in gen_for_enum()
108 let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); in gen_for_enum()
110 let into_app = into_app::gen_for_enum(item, item_name, generics)?; in gen_for_enum()
[all …]
Dinto_app.rs24 generics: &Generics, in gen_for_struct()
26 let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); in gen_for_struct()
64 generics: &Generics, in gen_for_enum()
66 let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); in gen_for_enum()
/third_party/rust/crates/syn/examples/heapsize/heapsize_derive/src/
Dlib.rs17 let generics = add_trait_bounds(input.generics); in derive_heap_size() localVariable
18 let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); in derive_heap_size()
37 fn add_trait_bounds(mut generics: Generics) -> Generics { in add_trait_bounds()
38 for param in &mut generics.params { in add_trait_bounds()
43 generics in add_trait_bounds()
/third_party/rust/crates/cxx/syntax/
Dparse.rs89 for pair in item.generics.params.into_pairs() { in parse_struct()
120 if let Some(where_clause) = &item.generics.where_clause { in parse_struct()
169 let generics = Lifetimes { in parse_struct() localVariable
170 lt_token: item.generics.lt_token, in parse_struct()
172 gt_token: item.generics.gt_token, in parse_struct()
184 generics, in parse_struct()
215 if !item.generics.params.is_empty() { in parse_enum()
219 let generics = &item.generics; in parse_enum() localVariable
220 let span = quote!(#vis #enum_token #ident #generics); in parse_enum()
222 } else if let Some(where_clause) = &item.generics.where_clause { in parse_enum()
[all …]
Dcheck.rs314 check_lifetimes(cx, &strct.generics); in check_api_struct()
351 check_lifetimes(cx, &enm.generics); in check_api_enum()
371 check_lifetimes(cx, &ety.generics); in check_api_type()
406 if !efn.generics.params.is_empty() && !efn.trusted { in check_api_fn()
412 if !efn.generics.params.is_empty() && efn.unsafety.is_none() { in check_api_fn()
423 check_generics(cx, &efn.sig.generics); in check_api_fn()
497 check_lifetimes(cx, &alias.generics); in check_api_type_alias()
555 if !resolve.generics.lifetimes.is_empty() { in check_mut_return_restriction()
572 Some(resolve) => !resolve.generics.lifetimes.is_empty(), in check_mut_return_restriction()
623 fn check_lifetimes(cx: &mut Check, generics: &Lifetimes) { in check_lifetimes()
[all …]
Dtypes.rs57 let mut add_resolution = |name: &'a Pair, generics: &'a Lifetimes| { in collect()
58 resolutions.insert(&name.rust, Resolution { name, generics }); in collect()
88 add_resolution(&strct.name, &strct.generics); in collect()
115 add_resolution(&enm.name, &enm.generics); in collect()
132 add_resolution(&ety.name, &ety.generics); in collect()
140 add_resolution(&ety.name, &ety.generics); in collect()
162 add_resolution(&alias.name, &alias.generics); in collect()
Dtokens.rs181 self.generics.to_tokens(tokens); in to_tokens()
190 self.generics.to_tokens(tokens); in to_tokens()
199 self.generics.to_tokens(tokens); in to_tokens()
208 self.generics.to_tokens(tokens); in to_tokens()
260 generics: _, in to_tokens()
304 let NamedType { rust, generics } = self; in to_tokens()
306 generics.to_tokens(tokens); in to_tokens()
Dmod.rs89 pub generics: Lifetimes, field
104 pub generics: Lifetimes, field
117 pub generics: Lifetimes, field
157 pub generics: Lifetimes, field
185 pub generics: Generics, field
305 pub generics: Lifetimes, field
/third_party/rust/crates/syn/tests/
Dtest_generics.rs103 let generics = input.generics; in test_split_for_impl() localVariable
104 let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); in test_split_for_impl()
256 let where_clause = input.sig.generics.where_clause.as_ref().unwrap(); in test_fn_precedence_in_where_clause()
Dtest_precedence.rs335 if !const_item.generics.params.is_empty() in librustc_parenthesize()
336 || !const_item.generics.where_clause.predicates.is_empty() => {} in librustc_parenthesize()
344 if !const_item.generics.params.is_empty() in librustc_parenthesize()
345 || !const_item.generics.where_clause.predicates.is_empty() => in librustc_parenthesize()
356 if !const_item.generics.params.is_empty() in librustc_parenthesize()
357 || !const_item.generics.where_clause.predicates.is_empty() => in librustc_parenthesize()
/third_party/rust/crates/syn/src/gen/
Dclone.rs48 generics: self.generics.clone(), in clone()
60 generics: self.generics.clone(), in clone()
164 generics: self.generics.clone(), in clone()
221 generics: self.generics.clone(), in clone()
916 generics: self.generics.clone(), in clone()
981 generics: self.generics.clone(), in clone()
1024 generics: self.generics.clone(), in clone()
1081 generics: self.generics.clone(), in clone()
1099 generics: self.generics.clone(), in clone()
1154 generics: self.generics.clone(), in clone()
[all …]
Deq.rs45 self.ident == other.ident && self.generics == other.generics in eq()
56 self.ident == other.ident && self.generics == other.generics in eq()
182 self.ident == other.ident && self.generics == other.generics in eq()
239 && self.generics == other.generics && self.data == other.data in eq()
883 && self.generics == other.generics in eq()
972 && self.generics == other.generics && self.ty == other.ty in eq()
1008 && self.generics == other.generics && self.ty == other.ty in eq()
1059 && self.generics == other.generics && self.ty == other.ty in eq()
1071 && self.generics == other.generics && self.variants == other.variants in eq()
1115 && self.unsafety == other.unsafety && self.generics == other.generics in eq()
[all …]
/third_party/mesa3d/docs/gallium/
Dpipeline.txt8 generics (normals, ]
23 generics
76 generics
98 generics (+ new/extra ones) ]
/third_party/mesa3d/src/intel/compiler/
Dbrw_vue_map.c198 uint64_t generics = slots_valid & ~BITFIELD64_MASK(VARYING_SLOT_VAR0); in brw_compute_vue_map() local
199 while (generics != 0) { in brw_compute_vue_map()
200 const int varying = ffsll(generics) - 1; in brw_compute_vue_map()
205 generics &= ~BITFIELD64_BIT(varying); in brw_compute_vue_map()
/third_party/rust/crates/serde/serde_derive/src/internals/
Dreceiver.rs14 let ty_generics = input.generics.split_for_impl().1; in replace_receiver()
18 visitor.visit_generics_mut(&mut input.generics); in replace_receiver()
217 fn visit_generics_mut(&mut self, generics: &mut Generics) { in visit_generics_mut()
218 for param in &mut generics.params { in visit_generics_mut()
228 if let Some(where_clause) = &mut generics.where_clause { in visit_generics_mut()

1234