diff options
Diffstat (limited to 'tests/ui/unique/unique-cmp.rs')
-rw-r--r-- | tests/ui/unique/unique-cmp.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/unique/unique-cmp.rs b/tests/ui/unique/unique-cmp.rs new file mode 100644 index 000000000..ee05dd5a3 --- /dev/null +++ b/tests/ui/unique/unique-cmp.rs @@ -0,0 +1,11 @@ +// run-pass +#![allow(unused_allocation)] + +pub fn main() { + let i: Box<_> = Box::new(100); + assert_eq!(i, Box::new(100)); + assert!(i < Box::new(101)); + assert!(i <= Box::new(100)); + assert!(i > Box::new(99)); + assert!(i >= Box::new(99)); +} |