2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-06-07 13:00:38 -05:00
|
|
|
#[derive(PartialEq, PartialOrd, Eq, Ord, Debug)]
|
2014-10-30 15:33:47 -05:00
|
|
|
struct Foo(Box<[u8]>);
|
|
|
|
|
|
|
|
pub fn main() {
|
2015-02-15 02:52:21 -06:00
|
|
|
let a = Foo(Box::new([0, 1, 2]));
|
|
|
|
let b = Foo(Box::new([0, 1, 2]));
|
2015-06-07 13:00:38 -05:00
|
|
|
assert_eq!(a, b);
|
2014-10-30 15:33:47 -05:00
|
|
|
println!("{}", a != b);
|
|
|
|
println!("{}", a < b);
|
|
|
|
println!("{}", a <= b);
|
|
|
|
println!("{}", a == b);
|
|
|
|
println!("{}", a > b);
|
|
|
|
println!("{}", a >= b);
|
|
|
|
}
|