@@ -472,6 +472,8 @@ macro_rules! int_impl {
472
472
#[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MAX - 2).strict_add(1), " , stringify!( $SelfT) , "::MAX - 1);" ) ]
473
473
/// ```
474
474
///
475
+ /// The following panics because of overflow:
476
+ ///
475
477
/// ```should_panic
476
478
/// #![feature(strict_overflow_ops)]
477
479
#[ doc = concat!( "let _ = (" , stringify!( $SelfT) , "::MAX - 2).strict_add(3);" ) ]
@@ -552,6 +554,8 @@ macro_rules! int_impl {
552
554
#[ doc = concat!( "assert_eq!(1" , stringify!( $SelfT) , ".strict_add_unsigned(2), 3);" ) ]
553
555
/// ```
554
556
///
557
+ /// The following panics because of overflow:
558
+ ///
555
559
/// ```should_panic
556
560
/// #![feature(strict_overflow_ops)]
557
561
#[ doc = concat!( "let _ = (" , stringify!( $SelfT) , "::MAX - 2).strict_add_unsigned(3);" ) ]
@@ -606,6 +610,8 @@ macro_rules! int_impl {
606
610
#[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MIN + 2).strict_sub(1), " , stringify!( $SelfT) , "::MIN + 1);" ) ]
607
611
/// ```
608
612
///
613
+ /// The following panics because of overflow:
614
+ ///
609
615
/// ```should_panic
610
616
/// #![feature(strict_overflow_ops)]
611
617
#[ doc = concat!( "let _ = (" , stringify!( $SelfT) , "::MIN + 2).strict_sub(3);" ) ]
@@ -686,6 +692,8 @@ macro_rules! int_impl {
686
692
#[ doc = concat!( "assert_eq!(1" , stringify!( $SelfT) , ".strict_sub_unsigned(2), -1);" ) ]
687
693
/// ```
688
694
///
695
+ /// The following panics because of overflow:
696
+ ///
689
697
/// ```should_panic
690
698
/// #![feature(strict_overflow_ops)]
691
699
#[ doc = concat!( "let _ = (" , stringify!( $SelfT) , "::MIN + 2).strict_sub_unsigned(3);" ) ]
@@ -740,6 +748,8 @@ macro_rules! int_impl {
740
748
#[ doc = concat!( "assert_eq!(" , stringify!( $SelfT) , "::MAX.strict_mul(1), " , stringify!( $SelfT) , "::MAX);" ) ]
741
749
/// ```
742
750
///
751
+ /// The following panics because of overflow:
752
+ ///
743
753
/// ``` should_panic
744
754
/// #![feature(strict_overflow_ops)]
745
755
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MAX.strict_mul(2);" ) ]
@@ -831,11 +841,15 @@ macro_rules! int_impl {
831
841
#[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MIN + 1).strict_div(-1), " , stringify!( $Max) , ");" ) ]
832
842
/// ```
833
843
///
844
+ /// The following panics because of overflow:
845
+ ///
834
846
/// ```should_panic
835
847
/// #![feature(strict_overflow_ops)]
836
848
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.strict_div(-1);" ) ]
837
849
/// ```
838
850
///
851
+ /// The following panics because of division by zero:
852
+ ///
839
853
/// ```should_panic
840
854
/// #![feature(strict_overflow_ops)]
841
855
#[ doc = concat!( "let _ = (1" , stringify!( $SelfT) , ").strict_div(0);" ) ]
@@ -901,11 +915,15 @@ macro_rules! int_impl {
901
915
#[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MIN + 1).strict_div_euclid(-1), " , stringify!( $Max) , ");" ) ]
902
916
/// ```
903
917
///
918
+ /// The following panics because of overflow:
919
+ ///
904
920
/// ```should_panic
905
921
/// #![feature(strict_overflow_ops)]
906
922
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.strict_div_euclid(-1);" ) ]
907
923
/// ```
908
924
///
925
+ /// The following panics because of division by zero:
926
+ ///
909
927
/// ```should_panic
910
928
/// #![feature(strict_overflow_ops)]
911
929
#[ doc = concat!( "let _ = (1" , stringify!( $SelfT) , ").strict_div_euclid(0);" ) ]
@@ -970,11 +988,15 @@ macro_rules! int_impl {
970
988
#[ doc = concat!( "assert_eq!(5" , stringify!( $SelfT) , ".strict_rem(2), 1);" ) ]
971
989
/// ```
972
990
///
991
+ /// The following panics because of division by zero:
992
+ ///
973
993
/// ```should_panic
974
994
/// #![feature(strict_overflow_ops)]
975
995
#[ doc = concat!( "let _ = 5" , stringify!( $SelfT) , ".strict_rem(0);" ) ]
976
996
/// ```
977
997
///
998
+ /// The following panics because of overflow:
999
+ ///
978
1000
/// ```should_panic
979
1001
/// #![feature(strict_overflow_ops)]
980
1002
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.strict_rem(-1);" ) ]
@@ -1039,11 +1061,15 @@ macro_rules! int_impl {
1039
1061
#[ doc = concat!( "assert_eq!(5" , stringify!( $SelfT) , ".strict_rem_euclid(2), 1);" ) ]
1040
1062
/// ```
1041
1063
///
1064
+ /// The following panics because of division by zero:
1065
+ ///
1042
1066
/// ```should_panic
1043
1067
/// #![feature(strict_overflow_ops)]
1044
1068
#[ doc = concat!( "let _ = 5" , stringify!( $SelfT) , ".strict_rem_euclid(0);" ) ]
1045
1069
/// ```
1046
1070
///
1071
+ /// The following panics because of overflow:
1072
+ ///
1047
1073
/// ```should_panic
1048
1074
/// #![feature(strict_overflow_ops)]
1049
1075
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.strict_rem_euclid(-1);" ) ]
@@ -1121,6 +1147,8 @@ macro_rules! int_impl {
1121
1147
#[ doc = concat!( "assert_eq!(5" , stringify!( $SelfT) , ".strict_neg(), -5);" ) ]
1122
1148
/// ```
1123
1149
///
1150
+ /// The following panics because of overflow:
1151
+ ///
1124
1152
/// ```should_panic
1125
1153
/// #![feature(strict_overflow_ops)]
1126
1154
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.strict_neg();" ) ]
@@ -1175,6 +1203,8 @@ macro_rules! int_impl {
1175
1203
#[ doc = concat!( "assert_eq!(0x1" , stringify!( $SelfT) , ".strict_shl(4), 0x10);" ) ]
1176
1204
/// ```
1177
1205
///
1206
+ /// The following panics because of overflow:
1207
+ ///
1178
1208
/// ```should_panic
1179
1209
/// #![feature(strict_overflow_ops)]
1180
1210
#[ doc = concat!( "let _ = 0x1" , stringify!( $SelfT) , ".strict_shl(129);" ) ]
@@ -1256,6 +1286,8 @@ macro_rules! int_impl {
1256
1286
#[ doc = concat!( "assert_eq!(0x10" , stringify!( $SelfT) , ".strict_shr(4), 0x1);" ) ]
1257
1287
/// ```
1258
1288
///
1289
+ /// The following panics because of overflow:
1290
+ ///
1259
1291
/// ```should_panic
1260
1292
/// #![feature(strict_overflow_ops)]
1261
1293
#[ doc = concat!( "let _ = 0x10" , stringify!( $SelfT) , ".strict_shr(128);" ) ]
@@ -1340,6 +1372,8 @@ macro_rules! int_impl {
1340
1372
#[ doc = concat!( "assert_eq!((-5" , stringify!( $SelfT) , ").strict_abs(), 5);" ) ]
1341
1373
/// ```
1342
1374
///
1375
+ /// The following panics because of overflow:
1376
+ ///
1343
1377
/// ```should_panic
1344
1378
/// #![feature(strict_overflow_ops)]
1345
1379
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.strict_abs();" ) ]
@@ -1414,6 +1448,8 @@ macro_rules! int_impl {
1414
1448
#[ doc = concat!( "assert_eq!(8" , stringify!( $SelfT) , ".strict_pow(2), 64);" ) ]
1415
1449
/// ```
1416
1450
///
1451
+ /// The following panics because of overflow:
1452
+ ///
1417
1453
/// ```should_panic
1418
1454
/// #![feature(strict_overflow_ops)]
1419
1455
#[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MAX.strict_pow(2);" ) ]
0 commit comments