Lines Matching refs:DerivableTraits
101 struct DerivableTraits: u16 {
114 fn derives_of_item(item: &Item, ctx: &BindgenContext) -> DerivableTraits { in derives_of_item() argument
115 let mut derivable_traits = DerivableTraits::empty(); in derives_of_item()
118 derivable_traits |= DerivableTraits::DEBUG; in derives_of_item()
122 derivable_traits |= DerivableTraits::DEFAULT; in derives_of_item()
128 derivable_traits |= DerivableTraits::COPY; in derives_of_item()
139 derivable_traits |= DerivableTraits::CLONE; in derives_of_item()
144 derivable_traits |= DerivableTraits::HASH; in derives_of_item()
148 derivable_traits |= DerivableTraits::PARTIAL_ORD; in derives_of_item()
152 derivable_traits |= DerivableTraits::ORD; in derives_of_item()
156 derivable_traits |= DerivableTraits::PARTIAL_EQ; in derives_of_item()
160 derivable_traits |= DerivableTraits::EQ; in derives_of_item()
166 impl From<DerivableTraits> for Vec<&'static str> {
167 fn from(derivable_traits: DerivableTraits) -> Vec<&'static str> { in from()
169 (DerivableTraits::DEBUG, "Debug"), in from()
170 (DerivableTraits::DEFAULT, "Default"), in from()
171 (DerivableTraits::COPY, "Copy"), in from()
172 (DerivableTraits::CLONE, "Clone"), in from()
173 (DerivableTraits::HASH, "Hash"), in from()
174 (DerivableTraits::PARTIAL_ORD, "PartialOrd"), in from()
175 (DerivableTraits::ORD, "Ord"), in from()
176 (DerivableTraits::PARTIAL_EQ, "PartialEq"), in from()
177 (DerivableTraits::EQ, "Eq"), in from()
1959 if !derivable_traits.contains(DerivableTraits::DEBUG) { in codegen()
1966 if !derivable_traits.contains(DerivableTraits::DEFAULT) { in codegen()
1975 if derivable_traits.contains(DerivableTraits::COPY) && in codegen()
1976 !derivable_traits.contains(DerivableTraits::CLONE) in codegen()
1981 if !derivable_traits.contains(DerivableTraits::PARTIAL_EQ) { in codegen()
2952 DerivableTraits::CLONE | in codegen()
2953 DerivableTraits::COPY | in codegen()
2954 DerivableTraits::HASH | in codegen()
2955 DerivableTraits::PARTIAL_EQ | in codegen()
2956 DerivableTraits::EQ, in codegen()