| 1 | mod modelsrust-analyzer cargo educe 0.6.0 trait_handlers/ord/models/; |
| 2 | mod ord_enumrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_enum/; |
| 3 | mod ord_structrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_struct/; |
| 4 | mod panicrust-analyzer cargo educe 0.6.0 trait_handlers/ord/panic/; |
| 5 | |
| 6 | use quoterust-analyzer cargo quote 1.0.47 crate/::quoterust-analyzer cargo quote 1.0.47 quote!; |
| 7 | use synrust-analyzer cargo syn 2.0.119 crate/::{Datarust-analyzer cargo syn 2.0.119 derive/Data#, DeriveInputrust-analyzer cargo syn 2.0.119 derive/DeriveInput#, Metarust-analyzer cargo syn 2.0.119 attr/Meta#}; |
| 8 | |
| 9 | use superrust-analyzer cargo educe 0.6.0 trait_handlers/::TraitHandlerrust-analyzer cargo educe 0.6.0 trait_handlers/TraitHandler#; |
| 10 | use craterust-analyzer cargo educe 0.6.0 crate/::Traitrust-analyzer cargo educe 0.6.0 supported_traits/Trait#; |
| 11 | |
| 12 | pub(craterust-analyzer cargo educe 0.6.0 crate/) struct OrdHandlerrust-analyzer cargo educe 0.6.0 trait_handlers/ord/OrdHandler#; |
| 13 | |
| 14 | impl TraitHandlerrust-analyzer cargo educe 0.6.0 trait_handlers/TraitHandler# for OrdHandlerrust-analyzer cargo educe 0.6.0 trait_handlers/ord/OrdHandler# { |
| 15 | #[inline] |
| 16 | fn trait_meta_handlerrust-analyzer cargo educe 0.6.0 trait_handlers/ord/impl#[OrdHandler][TraitHandler]trait_meta_handler().( |
| 17 | ast: &DeriveInputrust-analyzer cargo syn 2.0.119 derive/DeriveInput#, |
| 18 | token_stream: &mut proc_macro2rust-analyzer cargo proc-macro2 1.0.107 crate/::TokenStreamrust-analyzer cargo proc-macro2 1.0.107 TokenStream#, |
| 19 | traits: &[Traitrust-analyzer cargo educe 0.6.0 supported_traits/Trait#], |
| 20 | meta: &Metarust-analyzer cargo syn 2.0.119 attr/Meta#, |
| 21 | ) -> synrust-analyzer cargo syn 2.0.119 crate/::Resultrust-analyzer cargo syn 2.0.119 error/Result#<()> { |
| 22 | match ast.datarust-analyzer cargo syn 2.0.119 derive/DeriveInput#data. { |
| 23 | Datarust-analyzer cargo syn 2.0.119 derive/Data#::Structrust-analyzer cargo syn 2.0.119 derive/Data#Struct#(_) => { |
| 24 | ord_structrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_struct/::OrdStructHandlerrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_struct/OrdStructHandler#::trait_meta_handlerrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_struct/impl#[OrdStructHandler][TraitHandler]trait_meta_handler().(ast, token_stream, traits, meta) |
| 25 | }, |
| 26 | Datarust-analyzer cargo syn 2.0.119 derive/Data#::Enumrust-analyzer cargo syn 2.0.119 derive/Data#Enum#(_) => { |
| 27 | ord_enumrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_enum/::OrdEnumHandlerrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_enum/OrdEnumHandler#::trait_meta_handlerrust-analyzer cargo educe 0.6.0 trait_handlers/ord/ord_enum/impl#[OrdEnumHandler][TraitHandler]trait_meta_handler().(ast, token_stream, traits, meta) |
| 28 | }, |
| 29 | Datarust-analyzer cargo syn 2.0.119 derive/Data#::Unionrust-analyzer cargo syn 2.0.119 derive/Data#Union#(_) => { |
| 30 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(craterust-analyzer cargo educe 0.6.0 crate/::panicrust-analyzer cargo educe 0.6.0 panic/::trait_not_support_unionrust-analyzer cargo educe 0.6.0 panic/trait_not_support_union().(meta.pathrust-analyzer cargo syn 2.0.119 attr/impl#[Meta]path().().get_identrust-analyzer cargo syn 2.0.119 path/impl#[Path]get_ident().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().())) |
| 31 | }, |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | fn supertraitsrust-analyzer cargo educe 0.6.0 trait_handlers/ord/supertraits().(#[allow(unused_variables)] traits: &[Traitrust-analyzer cargo educe 0.6.0 supported_traits/Trait#]) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<proc_macro2rust-analyzer cargo proc-macro2 1.0.107 crate/::TokenStreamrust-analyzer cargo proc-macro2 1.0.107 TokenStream#> { |
| 37 | let mut supertraits = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![]; |
| 38 | supertraits.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(quoterust-analyzer cargo quote 1.0.47 quote!! {::core::cmp::Eq}); |
| 39 | |
| 40 | // We mustn't add the PartialOrd bound to the educed PartialOrd impl. |
| 41 | // When we're educing PartialOrd we can leave it off the Ord impl too, |
| 42 | // since we *know* Self is going to be PartialOrd. |
| 43 | #[cfg(feature = "PartialOrd")] |
| 44 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().traits.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]contains().(&Traitrust-analyzer cargo educe 0.6.0 supported_traits/Trait#::PartialOrdrust-analyzer cargo educe 0.6.0 supported_traits/Trait#PartialOrd#) { |
| 45 | supertraits.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(quoterust-analyzer cargo quote 1.0.47 quote!! {::core::cmp::PartialOrd}); |
| 46 | }; |
| 47 | |
| 48 | supertraits |
| 49 | } |