This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ unsafe impl Copy for u8 {}
59
59
unsafe impl Copy for u16 { }
60
60
unsafe impl Copy for u32 { }
61
61
unsafe impl Copy for u64 { }
62
+ unsafe impl Copy for u128 { }
62
63
unsafe impl Copy for usize { }
63
64
unsafe impl Copy for i8 { }
64
65
unsafe impl Copy for i16 { }
@@ -79,6 +80,7 @@ unsafe impl Sync for u8 {}
79
80
unsafe impl Sync for u16 { }
80
81
unsafe impl Sync for u32 { }
81
82
unsafe impl Sync for u64 { }
83
+ unsafe impl Sync for u128 { }
82
84
unsafe impl Sync for usize { }
83
85
unsafe impl Sync for i8 { }
84
86
unsafe impl Sync for i16 { }
@@ -294,6 +296,15 @@ impl PartialEq for u64 {
294
296
}
295
297
}
296
298
299
+ impl PartialEq for u128 {
300
+ fn eq ( & self , other : & u128 ) -> bool {
301
+ ( * self ) == ( * other)
302
+ }
303
+ fn ne ( & self , other : & u128 ) -> bool {
304
+ ( * self ) != ( * other)
305
+ }
306
+ }
307
+
297
308
impl PartialEq for usize {
298
309
fn eq ( & self , other : & usize ) -> bool {
299
310
( * self ) == ( * other)
Original file line number Diff line number Diff line change @@ -171,8 +171,7 @@ fn main() {
171
171
assert_eq ! ( intrinsics:: bitreverse( 0xddccu16 ) , 0x33bbu16 ) ;
172
172
assert_eq ! ( intrinsics:: bitreverse( 0xffee_ddccu32 ) , 0x33bb77ffu32 ) ;
173
173
assert_eq ! ( intrinsics:: bitreverse( 0x1234_5678_ffee_ddccu64 ) , 0x33bb77ff1e6a2c48u64 ) ;
174
- // != cannot be applied to type u128?
175
- // assert_eq!(intrinsics::bitreverse(0x1234_5678_ffee_ddcc_1234_5678_ffee_ddccu128), 0x33bb77ff1e6a2c4833bb77ff1e6a2c48u128);
174
+ assert_eq ! ( intrinsics:: bitreverse( 0x1234_5678_ffee_ddcc_1234_5678_ffee_ddccu128 ) , 0x33bb77ff1e6a2c4833bb77ff1e6a2c48u128 ) ;
176
175
177
176
assert_eq ! ( intrinsics:: bswap( 0xabu8 ) , 0xabu8 ) ;
178
177
assert_eq ! ( intrinsics:: bswap( 0xddccu16 ) , 0xccddu16 ) ;
You can’t perform that action at this time.
0 commit comments