diff options
Diffstat (limited to 'tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs')
-rw-r--r-- | tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs b/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs new file mode 100644 index 000000000..b6e6f136c --- /dev/null +++ b/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs @@ -0,0 +1,13 @@ +// run-pass +#![allow(dead_code)] +#[derive(PartialEq, Debug)] +enum S { + X { x: isize, y: isize }, + Y +} + +pub fn main() { + let x = S::X { x: 1, y: 2 }; + assert_eq!(x, x); + assert!(!(x != x)); +} |