blob: 3c4fb6c8c81b1b033d275dbab6b3a6cba1bab5e4 [file] [log] [blame]
Graydon Hoared1affff2012-12-11 01:32:481// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
Andrew Paseltinerec960962013-03-20 15:42:5911#[deriving(Eq)]
Patrick Waltona7aecc42012-11-20 02:05:5012enum Foo {
13 Bar,
14 Baz,
15 Boo
16}
17
Graydon Hoare89c8ef72013-02-02 03:43:1718pub fn main() {
Patrick Waltona7aecc42012-11-20 02:05:5019 let a = Bar;
20 let b = Bar;
Corey Richardsoncc57ca02013-05-19 02:02:4521 assert_eq!(a, b);
Patrick Walton1e915952013-03-29 01:39:0922 assert!(!(a != b));
23 assert!(a.eq(&b));
24 assert!(!a.ne(&b));
Patrick Waltona7aecc42012-11-20 02:05:5025}