| 1 | #![warn( |
| 2 | clippy::default_trait_access, |
| 3 | clippy::dbg_macro, |
| 4 | clippy::print_stdout, |
| 5 | clippy::unimplemented, |
| 6 | clippy::use_self, |
| 7 | missing_copy_implementations, |
| 8 | missing_docs, |
| 9 | non_snake_case, |
| 10 | non_upper_case_globals, |
| 11 | rust_2018_idioms, |
| 12 | unreachable_pub |
| 13 | )] |
| 14 | |
| 15 | use enum_as_innerrust-analyzer cargo enum-as-inner 0.6.1 crate/::EnumAsInnerrust-analyzer cargo enum-as-inner 0.6.1 EnumAsInner:; |
| 16 | |
| 17 | pub mod name_collisionsrust-analyzer cargo enum-as-inner 0.6.1 name_collisions/ { |
| 18 | #![allow(dead_code, missing_copy_implementations, missing_docs)] |
| 19 | pub struct Optionrust-analyzer cargo enum-as-inner 0.6.1 name_collisions/Option#; |
| 20 | pub struct Somerust-analyzer cargo enum-as-inner 0.6.1 name_collisions/Some#; |
| 21 | pub struct Nonerust-analyzer cargo enum-as-inner 0.6.1 name_collisions/None#; |
| 22 | pub struct Resultrust-analyzer cargo enum-as-inner 0.6.1 name_collisions/Result#; |
| 23 | pub struct Okrust-analyzer cargo enum-as-inner 0.6.1 name_collisions/Ok#; |
| 24 | pub struct Errrust-analyzer cargo enum-as-inner 0.6.1 name_collisions/Err#; |
| 25 | } |
| 26 | #[allow(unused_imports)] |
| 27 | use name_collisionsrust-analyzer cargo enum-as-inner 0.6.1 name_collisions/::*; |
| 28 | |
| 29 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, EnumAsInnerrust-analyzer cargo enum-as-inner 0.6.1 EnumAsInner:)] |
| 30 | #[allow(non_camel_case_types)] |
| 31 | #[allow(clippy::upper_case_acronyms)] |
| 32 | enum MixedCaseVariantsrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants# { |
| 33 | XMLIsNotCoolrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#XMLIsNotCool#, |
| 34 | Rust_IsCoolThoughrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#Rust_IsCoolThough#(u32), |
| 35 | YMCArust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#YMCA# { namedrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#YMCA#named.: i16 }, |
| 36 | } |
| 37 | |
| 38 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 39 | fn test_xml_unitrust-analyzer cargo enum-as-inner 0.6.1 test_xml_unit().() { |
| 40 | let mixed = MixedCaseVariantsrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#::XMLIsNotCoolrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#XMLIsNotCool#; |
| 41 | |
| 42 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(mixed.is_xml_is_not_coolrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]is_xml_is_not_cool().()); |
| 43 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(mixed.as_rust_is_cool_thoughrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_rust_is_cool_though().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()); |
| 44 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(mixed.as_ymcarust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_ymca().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()); |
| 45 | } |
| 46 | |
| 47 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 48 | fn test_rust_unnamedrust-analyzer cargo enum-as-inner 0.6.1 test_rust_unnamed().() { |
| 49 | let mixed = MixedCaseVariantsrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#::Rust_IsCoolThoughrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#Rust_IsCoolThough#(42); |
| 50 | |
| 51 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().mixed.is_xml_is_not_coolrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]is_xml_is_not_cool().()); |
| 52 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(mixed.as_rust_is_cool_thoughrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_rust_is_cool_though().().is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()); |
| 53 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(mixed.as_ymcarust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_ymca().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()); |
| 54 | |
| 55 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().mixed.as_rust_is_cool_thoughrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_rust_is_cool_though().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), 42); |
| 56 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(mixed.into_rust_is_cool_thoughrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]into_rust_is_cool_though().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 42); |
| 57 | } |
| 58 | |
| 59 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 60 | fn test_ymca_namedrust-analyzer cargo enum-as-inner 0.6.1 test_ymca_named().() { |
| 61 | let mixed = MixedCaseVariantsrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#::YMCArust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#YMCA# { namedrust-analyzer cargo enum-as-inner 0.6.1 MixedCaseVariants#YMCA#named.: -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i16][Neg]neg().32_768 }; |
| 62 | |
| 63 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().mixed.is_xml_is_not_coolrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]is_xml_is_not_cool().()); |
| 64 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(mixed.as_rust_is_cool_thoughrust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_rust_is_cool_though().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()); |
| 65 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(mixed.as_ymcarust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_ymca().().is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()); |
| 66 | |
| 67 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().mixed.as_ymcarust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]as_ymca().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), (-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i16][Neg]neg().32_768)); |
| 68 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(mixed.into_ymcarust-analyzer cargo enum-as-inner 0.6.1 impl#[MixedCaseVariants]into_ymca().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), (-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i16][Neg]neg().32_768)); |
| 69 | } |