@@ -805,8 +805,7 @@ assert_eq!((1", stringify!($SelfT), ").checked_div_euclid(0), None);
805
805
Basic usage:
806
806
807
807
```
808
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
809
-
808
+ " , $Feature, "
810
809
assert_eq!(5" , stringify!( $SelfT) , ".checked_rem(2), Some(1));
811
810
assert_eq!(5" , stringify!( $SelfT) , ".checked_rem(0), None);
812
811
assert_eq!(" , stringify!( $SelfT) , "::MIN.checked_rem(-1), None);" ,
@@ -836,8 +835,6 @@ if `rhs == 0` or the division results in overflow.
836
835
Basic usage:
837
836
838
837
```
839
- use std::" , stringify!( $SelfT) , ";
840
-
841
838
assert_eq!(5" , stringify!( $SelfT) , ".checked_rem_euclid(2), Some(1));
842
839
assert_eq!(5" , stringify!( $SelfT) , ".checked_rem_euclid(0), None);
843
840
assert_eq!(" , stringify!( $SelfT) , "::MIN.checked_rem_euclid(-1), None);
@@ -864,8 +861,7 @@ assert_eq!(", stringify!($SelfT), "::MIN.checked_rem_euclid(-1), None);
864
861
Basic usage:
865
862
866
863
```
867
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
868
-
864
+ " , $Feature, "
869
865
assert_eq!(5" , stringify!( $SelfT) , ".checked_neg(), Some(-5));
870
866
assert_eq!(" , stringify!( $SelfT) , "::MIN.checked_neg(), None);" ,
871
867
$EndFeature, "
@@ -936,8 +932,7 @@ $EndFeature, "
936
932
Basic usage:
937
933
938
934
```
939
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
940
-
935
+ " , $Feature, "
941
936
assert_eq!((-5" , stringify!( $SelfT) , ").checked_abs(), Some(5));
942
937
assert_eq!(" , stringify!( $SelfT) , "::MIN.checked_abs(), None);" ,
943
938
$EndFeature, "
@@ -1115,8 +1110,7 @@ numeric bounds instead of overflowing.
1115
1110
Basic usage:
1116
1111
1117
1112
```
1118
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
1119
-
1113
+ " , $Feature, "
1120
1114
assert_eq!(10" , stringify!( $SelfT) , ".saturating_mul(12), 120);
1121
1115
assert_eq!(" , stringify!( $SelfT) , "::MAX.saturating_mul(10), " , stringify!( $SelfT) , "::MAX);
1122
1116
assert_eq!(" , stringify!( $SelfT) , "::MIN.saturating_mul(10), " , stringify!( $SelfT) , "::MIN);" ,
@@ -1148,8 +1142,7 @@ saturating at the numeric bounds instead of overflowing.
1148
1142
Basic usage:
1149
1143
1150
1144
```
1151
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
1152
-
1145
+ " , $Feature, "
1153
1146
assert_eq!((-4" , stringify!( $SelfT) , ").saturating_pow(3), -64);
1154
1147
assert_eq!(" , stringify!( $SelfT) , "::MIN.saturating_pow(2), " , stringify!( $SelfT) , "::MAX);
1155
1148
assert_eq!(" , stringify!( $SelfT) , "::MIN.saturating_pow(3), " , stringify!( $SelfT) , "::MIN);" ,
@@ -1536,8 +1529,7 @@ occur. If an overflow would have occurred then the wrapped value is returned.
1536
1529
Basic usage:
1537
1530
1538
1531
```
1539
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
1540
-
1532
+ " , $Feature, "
1541
1533
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_add(2), (7, false));
1542
1534
assert_eq!(" , stringify!( $SelfT) , "::MAX.overflowing_add(1), (" , stringify!( $SelfT) ,
1543
1535
"::MIN, true));" , $EndFeature, "
@@ -1564,8 +1556,7 @@ would occur. If an overflow would have occurred then the wrapped value is return
1564
1556
Basic usage:
1565
1557
1566
1558
```
1567
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
1568
-
1559
+ " , $Feature, "
1569
1560
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_sub(2), (3, false));
1570
1561
assert_eq!(" , stringify!( $SelfT) , "::MIN.overflowing_sub(1), (" , stringify!( $SelfT) ,
1571
1562
"::MAX, true));" , $EndFeature, "
@@ -1622,8 +1613,7 @@ This function will panic if `rhs` is 0.
1622
1613
Basic usage:
1623
1614
1624
1615
```
1625
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
1626
-
1616
+ " , $Feature, "
1627
1617
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_div(2), (2, false));
1628
1618
assert_eq!(" , stringify!( $SelfT) , "::MIN.overflowing_div(-1), (" , stringify!( $SelfT) ,
1629
1619
"::MIN, true));" ,
@@ -1658,8 +1648,6 @@ This function will panic if `rhs` is 0.
1658
1648
Basic usage:
1659
1649
1660
1650
```
1661
- use std::" , stringify!( $SelfT) , ";
1662
-
1663
1651
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_div_euclid(2), (2, false));
1664
1652
assert_eq!(" , stringify!( $SelfT) , "::MIN.overflowing_div_euclid(-1), (" , stringify!( $SelfT) ,
1665
1653
"::MIN, true));
@@ -1693,8 +1681,7 @@ This function will panic if `rhs` is 0.
1693
1681
Basic usage:
1694
1682
1695
1683
```
1696
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
1697
-
1684
+ " , $Feature, "
1698
1685
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_rem(2), (1, false));
1699
1686
assert_eq!(" , stringify!( $SelfT) , "::MIN.overflowing_rem(-1), (0, true));" ,
1700
1687
$EndFeature, "
@@ -1729,8 +1716,6 @@ This function will panic if `rhs` is 0.
1729
1716
Basic usage:
1730
1717
1731
1718
```
1732
- use std::" , stringify!( $SelfT) , ";
1733
-
1734
1719
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_rem_euclid(2), (1, false));
1735
1720
assert_eq!(" , stringify!( $SelfT) , "::MIN.overflowing_rem_euclid(-1), (0, true));
1736
1721
```" ) ,
@@ -1761,8 +1746,6 @@ minimum value will be returned again and `true` will be returned for an overflow
1761
1746
Basic usage:
1762
1747
1763
1748
```
1764
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
1765
-
1766
1749
assert_eq!(2" , stringify!( $SelfT) , ".overflowing_neg(), (-2, false));
1767
1750
assert_eq!(" , stringify!( $SelfT) , "::MIN.overflowing_neg(), (" , stringify!( $SelfT) ,
1768
1751
"::MIN, true));" , $EndFeature, "
@@ -3187,8 +3170,7 @@ saturating at the numeric bounds instead of overflowing.
3187
3170
Basic usage:
3188
3171
3189
3172
```
3190
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
3191
-
3173
+ " , $Feature, "
3192
3174
assert_eq!(2" , stringify!( $SelfT) , ".saturating_mul(10), 20);
3193
3175
assert_eq!((" , stringify!( $SelfT) , "::MAX).saturating_mul(10), " , stringify!( $SelfT) ,
3194
3176
"::MAX);" , $EndFeature, "
@@ -3215,8 +3197,7 @@ saturating at the numeric bounds instead of overflowing.
3215
3197
Basic usage:
3216
3198
3217
3199
```
3218
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
3219
-
3200
+ " , $Feature, "
3220
3201
assert_eq!(4" , stringify!( $SelfT) , ".saturating_pow(3), 64);
3221
3202
assert_eq!(" , stringify!( $SelfT) , "::MAX.saturating_pow(2), " , stringify!( $SelfT) , "::MAX);" ,
3222
3203
$EndFeature, "
@@ -3553,8 +3534,7 @@ have occurred then the wrapped value is returned.
3553
3534
Basic usage
3554
3535
3555
3536
```
3556
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
3557
-
3537
+ " , $Feature, "
3558
3538
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_add(2), (7, false));
3559
3539
assert_eq!(" , stringify!( $SelfT) , "::MAX.overflowing_add(1), (0, true));" , $EndFeature, "
3560
3540
```" ) ,
@@ -3581,8 +3561,7 @@ have occurred then the wrapped value is returned.
3581
3561
Basic usage
3582
3562
3583
3563
```
3584
- " , $Feature, "use std::" , stringify!( $SelfT) , ";
3585
-
3564
+ " , $Feature, "
3586
3565
assert_eq!(5" , stringify!( $SelfT) , ".overflowing_sub(2), (3, false));
3587
3566
assert_eq!(0" , stringify!( $SelfT) , ".overflowing_sub(1), (" , stringify!( $SelfT) , "::MAX, true));" ,
3588
3567
$EndFeature, "
@@ -4868,7 +4847,6 @@ impl usize {
4868
4847
///
4869
4848
/// ```
4870
4849
/// use std::num::FpCategory;
4871
- /// use std::f32;
4872
4850
///
4873
4851
/// let num = 12.4_f32;
4874
4852
/// let inf = f32::INFINITY;
0 commit comments