| 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 | #[allow(dead_code)] |
| 30 | #[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:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, EnumAsInnerrust-analyzer cargo enum-as-inner 0.6.1 EnumAsInner:)] |
| 31 | enum WithGenericsrust-analyzer cargo enum-as-inner 0.6.1 WithGenerics#<T: Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone# + Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#> { |
| 32 | Arust-analyzer cargo enum-as-inner 0.6.1 WithGenerics#A#(T), |
| 33 | Brust-analyzer cargo enum-as-inner 0.6.1 WithGenerics#B#(T), |
| 34 | } |
| 35 | |
| 36 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 37 | fn with_genericsrust-analyzer cargo enum-as-inner 0.6.1 with_generics().() { |
| 38 | let mut with_generics = WithGenericsrust-analyzer cargo enum-as-inner 0.6.1 WithGenerics#::Arust-analyzer cargo enum-as-inner 0.6.1 WithGenerics#A#(100); |
| 39 | |
| 40 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(with_generics.is_arust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]is_a().()); |
| 41 | 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().with_generics.is_brust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]is_b().()); |
| 42 | |
| 43 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(with_generics.as_arust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]as_a().().is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()); |
| 44 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(with_generics.as_brust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]as_b().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()); |
| 45 | |
| 46 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(with_generics.into_arust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]into_a().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 100); |
| 47 | 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().with_generics.as_arust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]as_a().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), 100); |
| 48 | 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#[`&mut T`][Deref]deref().with_generics.as_a_mutrust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]as_a_mut().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), 100); |
| 49 | |
| 50 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(with_generics.into_brust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]into_b().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().()); |
| 51 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(with_generics.as_brust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]as_b().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()); |
| 52 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(with_generics.as_b_mutrust-analyzer cargo enum-as-inner 0.6.1 impl#[`WithGenerics<T>`]as_b_mut().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()); |
| 53 | } |