blob: 6b58fd966220ad672e447da80f88ab0bc945c70c (
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));
}
|