Manually format functions and use rhs instead of v from my CE tes… · patricklam/verify-rust-std@5f8cf71 (original) (raw)

Original file line number Diff line number Diff line change
@@ -1329,11 +1329,11 @@ macro_rules! int_impl {
1329 1329 #[must_use = "this returns the result of the operation, \
1330 1330 without modifying the original"]
1331 1331 #[inline]
1332 -pub const fn unbounded_shl(self, v: u32) -> $SelfT{
1333 -if v < Self::BITS{
1332 +pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
1333 +if rhs < Self::BITS{
1334 1334 // SAFETY:
1335 -// v is just checked to be in-range above
1336 -unsafe{self.unchecked_shl(v)}
1335 +// rhs is just checked to be in-range above
1336 +unsafe { self.unchecked_shl(rhs) }
1337 1337 }else{
1338 1338 0
1339 1339 }
@@ -1456,17 +1456,17 @@ macro_rules! int_impl {
1456 1456 #[must_use = "this returns the result of the operation, \
1457 1457 without modifying the original"]
1458 1458 #[inline]
1459 -pub const fn unbounded_shr(self, v: u32) -> $SelfT{
1460 -if v < Self::BITS{
1459 +pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
1460 +if rhs < Self::BITS{
1461 1461 // SAFETY:
1462 -// v is just checked to be in-range above
1463 -unsafe{self.unchecked_shr(v)}
1462 +// rhs is just checked to be in-range above
1463 +unsafe { self.unchecked_shr(rhs) }
1464 1464 }else{
1465 1465 // A shift by `Self::BITS-1` suffices for signed integers, because the sign bit is copied for each of the shifted bits.
1466 1466
1467 1467 // SAFETY:
1468 1468 // `Self::BITS-1` is guaranteed to be less than `Self::BITS`
1469 -unsafe{self.unchecked_shr(Self::BITS - 1)}
1469 +unsafe { self.unchecked_shr(Self::BITS - 1) }
1470 1470 }
1471 1471 }
1472 1472