4 #![warn(absurd_extreme_comparisons)]
5 #![allow(unused, eq_op, no_effect, unnecessary_operation, needless_pass_by_value)]
30 // this is handled by unit_cmp
34 use std::cmp::{Ordering, PartialEq, PartialOrd};
36 #[derive(PartialEq, PartialOrd)]
39 impl PartialEq<u32> for U {
40 fn eq(&self, other: &u32) -> bool {
41 self.eq(&U(u64::from(*other)))
44 impl PartialOrd<u32> for U {
45 fn partial_cmp(&self, other: &u32) -> Option<Ordering> {
46 self.partial_cmp(&U(u64::from(*other)))
50 pub fn foo(val: U) -> bool {