about summary refs log tree commit diff
path: root/tests/ui/deriving/deriving-via-extension-enum.rs
blob: f844c8243d4317fe5e963c1dadea23e3edfad861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ run-pass
#![allow(dead_code)]
#[derive(PartialEq, Debug)]
enum Foo {
    Bar(isize, isize),
    Baz(f64, f64)
}

pub fn main() {
    let a = Foo::Bar(1, 2);
    let b = Foo::Bar(1, 2);
    assert_eq!(a, b);
    assert!(!(a != b));
    assert!(a.eq(&b));
    assert!(!a.ne(&b));
}