// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#[deriving(Show)]
enum chan { chan_t, }
-impl cmp::Eq for chan {
+impl Copy for chan {}
+
+impl PartialEq for chan {
fn eq(&self, other: &chan) -> bool {
((*self) as uint) == ((*other) as uint)
}
}
fn wrapper3(i: chan) {
- assert_eq!(i, chan_t);
+ assert_eq!(i, chan::chan_t);
}
pub fn main() {
- let wrapped = {||wrapper3(chan_t)};
+ let wrapped = {||wrapper3(chan::chan_t)};
wrapped();
}