summaryrefslogtreecommitdiffstats
path: root/src/test/ui/deriving/deriving-via-extension-c-enum.rs
blob: 7fa1a69d7e0a0fa81156c80081d2eadcd1c92efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass
#![allow(dead_code)]
#[derive(PartialEq, Debug)]
enum Foo {
    Bar,
    Baz,
    Boo
}

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