rust/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
206 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
2015-01-28 13:34:18 +00:00
#[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);
2013-03-29 01:39:09 +00:00
assert!(!(x != x));
}