summary refs log tree commit diff
path: root/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs
blob: fe382c4e4b90790e49bb98d0facfed37388346b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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));
}