Skip to content

Commit 169231d

Browse files
committed
rollup merge of #23780: ruud-v-a/wrapping
This allows `Wrapping<T>` to be used in `assert_eq!`, for example. One of the tests (compile-fail/xc-private-method.rs) fails, but I can hardly imagine it is related to this change. I would also like to add a tests to ensure that `assert_eq!` compiles and keeps working in the future for `Wrapped<T>` values, but there appear to be no tests in libcore. What would be a good place to add such a test?
2 parents dc6bb5e + 975ebc1 commit 169231d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/num/wrapping.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ macro_rules! wrapping_impl {
6767
wrapping_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 }
6868

6969
#[unstable(feature = "core", reason = "may be removed, renamed, or relocated")]
70-
#[derive(PartialEq,Eq,PartialOrd,Ord,Clone,Copy)]
70+
#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone, Copy)]
7171
pub struct Wrapping<T>(pub T);
7272

7373
impl<T:WrappingOps> Add for Wrapping<T> {

0 commit comments

Comments
 (0)