blob: 1e7afc80b7d0bc608e55f5c16f766fb106885748 [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
Patrick Waltona7aecc42012-11-20 02:05:5011#[deriving_eq]
12enum Foo {
13 Bar,
14 Baz,
15 Boo
16}
17
18fn main() {
19 let a = Bar;
20 let b = Bar;
21 assert a == b;
22 assert !(a != b);
23 assert a.eq(&b);
24 assert !a.ne(&b);
25}
26