]> git.lizzy.rs Git - rust.git/blob - tests/ui/deriving/deriving-eq-ord-boxed-slice.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / deriving / deriving-eq-ord-boxed-slice.rs
1 // run-pass
2 #[derive(PartialEq, PartialOrd, Eq, Ord, Debug)]
3 struct Foo(Box<[u8]>);
4
5 pub fn main() {
6     let a = Foo(Box::new([0, 1, 2]));
7     let b = Foo(Box::new([0, 1, 2]));
8     assert_eq!(a, b);
9     println!("{}", a != b);
10     println!("{}", a < b);
11     println!("{}", a <= b);
12     println!("{}", a == b);
13     println!("{}", a > b);
14     println!("{}", a >= b);
15 }