2 #![allow(non_camel_case_types)]
3 #![allow(non_upper_case_globals)]
8 struct foo { a: isize, b: isize, c: isize }
10 impl cmp::PartialEq for foo {
11 fn eq(&self, other: &foo) -> bool {
12 (*self).a == (*other).a &&
13 (*self).b == (*other).b &&
14 (*self).c == (*other).c
16 fn ne(&self, other: &foo) -> bool { !(*self).eq(other) }
19 const x : foo = foo { a:1, b:2, c: 3 };
20 const y : foo = foo { b:2, c:3, a: 1 };
21 const z : &'static foo = &foo { a: 10, b: 22, c: 12 };
22 const w : foo = foo { a:5, ..x };
30 println!("{:#x}", x.b);
31 println!("{:#x}", z.c);