Home
last modified time | relevance | path

Searched refs:Trait (Results 1 – 25 of 47) sorted by relevance

12

/third_party/rust/crates/cxx/syntax/
Dderive.rs6 pub what: Trait,
11 pub enum Trait { enum
29 "Clone" => Trait::Clone, in from()
30 "Copy" => Trait::Copy, in from()
31 "Debug" => Trait::Debug, in from()
32 "Default" => Trait::Default, in from()
33 "Eq" => Trait::Eq, in from()
34 "ExternType" => Trait::ExternType, in from()
35 "Hash" => Trait::Hash, in from()
36 "Ord" => Trait::Ord, in from()
[all …]
Dpod.rs2 use crate::syntax::{derive, Trait, Type, Types};
16 derive::contains(&strct.derives, Trait::Copy) in is_guaranteed_pod()
Dcheck.rs6 NamedType, Ptr, Receiver, Ref, Signature, SliceRef, Struct, Trait, Ty1, Type, TypeAlias, Types,
329 if derive.what == Trait::ExternType { in check_api_struct()
362 if derive.what == Trait::Default || derive.what == Trait::ExternType { in check_api_enum()
374 if derive.what == Trait::ExternType && ety.lang == Lang::Rust { in check_api_type()
/third_party/node/deps/v8/src/heap/
Dheap-controller.cc13 template <typename Trait>
14 double MemoryController<Trait>::GrowingFactor(Heap* heap, size_t max_heap_size, in GrowingFactor()
24 Trait::kName, factor, Trait::kTargetMutatorUtilization, in GrowingFactor()
30 template <typename Trait>
31 double MemoryController<Trait>::MaxGrowingFactor(size_t max_heap_size) { in MaxGrowingFactor()
37 max_size = std::max({max_size, Trait::kMinSize}); in MaxGrowingFactor()
41 if (max_size >= Trait::kMaxSize) { in MaxGrowingFactor()
45 DCHECK_GE(max_size, Trait::kMinSize); in MaxGrowingFactor()
46 DCHECK_LT(max_size, Trait::kMaxSize); in MaxGrowingFactor()
49 double factor = (max_size - Trait::kMinSize) * in MaxGrowingFactor()
[all …]
Dheap-controller.h34 template <typename Trait>
/third_party/rust/crates/serde/test_suite/tests/
Dtest_self.rs7 pub trait Trait { in test_self() interface
12 pub struct Generics<T: Trait<Assoc = Self>> in test_self()
14 Self: Trait<Assoc = Self>, in test_self()
15 <Self as Trait>::Assoc: Sized, in test_self()
20 impl<T: Trait<Assoc = Self>> Trait for Generics<T> { in test_self()
27 _f2: Box<<Self as Trait>::Assoc>, in test_self()
39 impl Trait for Struct { in test_self()
46 Box<<Self as Trait>::Assoc>, in test_self()
58 impl Trait for Tuple { in test_self()
66 _f2: Box<<Self as Trait>::Assoc>, in test_self()
[all …]
/third_party/rust/crates/cxx/macro/src/
Dderive.rs1 use crate::syntax::{derive, Enum, Struct, Trait};
14 Trait::Copy => expanded.extend(struct_copy(strct, span)), in expand_struct()
15 Trait::Clone => expanded.extend(struct_clone(strct, span)), in expand_struct()
16 Trait::Debug => expanded.extend(struct_debug(strct, span)), in expand_struct()
17 Trait::Default => expanded.extend(struct_default(strct, span)), in expand_struct()
18 Trait::Eq => traits.push(quote_spanned!(span=> ::cxx::core::cmp::Eq)), in expand_struct()
19 Trait::ExternType => unreachable!(), in expand_struct()
20 Trait::Hash => traits.push(quote_spanned!(span=> ::cxx::core::hash::Hash)), in expand_struct()
21 Trait::Ord => expanded.extend(struct_ord(strct, span)), in expand_struct()
22 Trait::PartialEq => traits.push(quote_spanned!(span=> ::cxx::core::cmp::PartialEq)), in expand_struct()
[all …]
/third_party/rust/crates/syn/tests/
Dtest_item.rs66 impl !Trait {} in test_negative_impl() implementation
68 impl !Trait {} in test_negative_impl()
78 impl !Trait for T {} in test_negative_impl()
80 impl !Trait for T {} in test_negative_impl()
126 TokenTree::Group(Group::new(Delimiter::None, quote!(Trait))), in test_macro_variable_impl()
165 let tokens = quote!(trait Trait where {}); in test_supertraits()
177 let tokens = quote!(trait Trait: where {}); in test_supertraits()
190 let tokens = quote!(trait Trait: Sized where {}); in test_supertraits()
214 let tokens = quote!(trait Trait: Sized + where {}); in test_supertraits()
Dtest_ty.rs220 let tokens = quote!(dyn for<'a> Trait<'a> + 'static); in test_trait_object()
258 let tokens = quote!(dyn 'a + Trait); in test_trait_object()
288 let tokens = quote!(impl Trait +); in test_trailing_plus()
307 let tokens = quote!(dyn Trait +); in test_trailing_plus()
327 let tokens = quote!(Trait +); in test_trailing_plus()
/third_party/skia/third_party/externals/abseil-cpp/absl/random/internal/
Ddistribution_caller.h40 template <template <class...> class Trait, class AlwaysVoid, class... Args>
42 template <template <class...> class Trait, class... Args>
43 struct detector<Trait, absl::void_t<Trait<Args...>>, Args...>
/third_party/skia/third_party/externals/abseil-cpp/absl/random/
Dbit_gen_ref.h89 template <template <class...> class Trait, class AlwaysVoid, class... Args>
91 template <template <class...> class Trait, class... Args>
92 struct detector<Trait, absl::void_t<Trait<Args...>>, Args...>
/third_party/rust/crates/static-assertions-rs/tests/
Deq_size.rs10 trait Trait { trait
14 impl<T: ?Sized> Trait for T {
21 assert_eq_size!(<Value as Trait>::AssocItem, Value);
/third_party/rust/crates/codespan/codespan-reporting/tests/snapshots/
Dterm__overlapping__rich_no_color.snap5 error[E0666]: nested `impl Trait` is not allowed
11 │ │ nested `impl Trait` here
12 │ outer `impl Trait`
Dterm__overlapping__rich_color.snap5 {fg:Red bold bright}error[E0666]{bold bright}: nested `impl Trait` is not allowed{/}
11 … {fg:Blue}│{/} {fg:Red}nested `impl Trait` here{/}
12 {fg:Blue}│{/} {fg:Blue}outer `impl Trait`{/}
Dterm__overlapping__short_no_color.snap5 nested_impl_trait.rs:5:56: error[E0666]: nested `impl Trait` is not allowed
Dterm__overlapping__short_color.snap5 nested_impl_trait.rs:5:56: {fg:Red bold bright}error[E0666]{bold bright}: nested `impl Trait` is no…
Dterm__overlapping__medium_no_color.snap5 nested_impl_trait.rs:5:56: error[E0666]: nested `impl Trait` is not allowed
Dterm__overlapping__medium_color.snap5 nested_impl_trait.rs:5:56: {fg:Red bold bright}error[E0666]{bold bright}: nested `impl Trait` is no…
/third_party/rust/crates/cfg-if/src/
Dlib.rs156 trait Trait { interface
163 impl Trait for Struct {
/third_party/rust/crates/cxx/gen/src/
Dwrite.rs12 derive, mangle, Api, Doc, Enum, EnumRepr, ExternFn, ExternType, Pair, Signature, Struct, Trait,
172 if derive::contains(&strct.derives, Trait::Hash) { in write_std_specializations()
250 let operator_eq = derive::contains(&strct.derives, Trait::PartialEq); in write_struct()
251 let operator_ord = derive::contains(&strct.derives, Trait::PartialOrd); in write_struct()
509 if derive::contains(&strct.derives, Trait::PartialEq) { in write_struct_operator_decls()
517 if !derive::contains(&strct.derives, Trait::Eq) { in write_struct_operator_decls()
527 if derive::contains(&strct.derives, Trait::PartialOrd) { in write_struct_operator_decls()
542 if !derive::contains(&strct.derives, Trait::Ord) { in write_struct_operator_decls()
559 if derive::contains(&strct.derives, Trait::Hash) { in write_struct_operator_decls()
579 if derive::contains(&strct.derives, Trait::PartialEq) { in write_struct_operators()
[all …]
/third_party/rust/crates/syn/src/
Dty.rs377 bounds.push_value(TypeParamBound::Trait(TraitBound { in ambig_ty()
412 TypeParamBound::Trait(TraitBound { in ambig_ty()
431 TypeParamBound::Trait(trait_bound) => { in ambig_ty()
432 TypeParamBound::Trait(TraitBound { in ambig_ty()
496 bounds.push_value(TypeParamBound::Trait(TraitBound { in ambig_ty()
809 TypeParamBound::Trait(_) | TypeParamBound::Verbatim(_) => { in parse_bounds()
849 TypeParamBound::Trait(_) | TypeParamBound::Verbatim(_) => { in parse()
/third_party/rust/crates/serde/serde_derive/src/
Dbound.rs229 syn::TypeParamBound::Trait(bound) => self.visit_path(&bound.path), in with_bound()
291 bounds: vec![syn::TypeParamBound::Trait(syn::TraitBound { in with_bound()
325 bounds: vec![syn::TypeParamBound::Trait(syn::TraitBound { in with_self_bound()
/third_party/rust/crates/bindgen/bindgen/codegen/postprocessing/
Dsort_semantically.rs23 Item::Trait(_) => 7, in visit_item_mod_mut()
/third_party/rust/crates/static-assertions-rs/
DCHANGELOG.md42 - **[breaking]** Trait assertions to use `Type: Trait` syntax
/third_party/rust/crates/syn/
DREADME.md240 - **`visit`** — Trait for traversing a syntax tree.
241 - **`visit-mut`** — Trait for traversing and mutating in place a syntax tree.
242 - **`fold`** — Trait for transforming an owned syntax tree.

12