@@ -481,6 +481,7 @@ macro_rules! int_impl {
481
481
#[ must_use = "this returns the result of the operation, \
482
482
without modifying the original"]
483
483
#[ inline]
484
+ #[ track_caller]
484
485
pub const fn strict_add( self , rhs: Self ) -> Self {
485
486
let ( a, b) = self . overflowing_add( rhs) ;
486
487
if unlikely!( b) { overflow_panic:: add( ) } else { a}
@@ -560,6 +561,7 @@ macro_rules! int_impl {
560
561
#[ must_use = "this returns the result of the operation, \
561
562
without modifying the original"]
562
563
#[ inline]
564
+ #[ track_caller]
563
565
pub const fn strict_add_unsigned( self , rhs: $UnsignedT) -> Self {
564
566
let ( a, b) = self . overflowing_add_unsigned( rhs) ;
565
567
if unlikely!( b) { overflow_panic:: add( ) } else { a}
@@ -613,6 +615,7 @@ macro_rules! int_impl {
613
615
#[ must_use = "this returns the result of the operation, \
614
616
without modifying the original"]
615
617
#[ inline]
618
+ #[ track_caller]
616
619
pub const fn strict_sub( self , rhs: Self ) -> Self {
617
620
let ( a, b) = self . overflowing_sub( rhs) ;
618
621
if unlikely!( b) { overflow_panic:: sub( ) } else { a}
@@ -692,6 +695,7 @@ macro_rules! int_impl {
692
695
#[ must_use = "this returns the result of the operation, \
693
696
without modifying the original"]
694
697
#[ inline]
698
+ #[ track_caller]
695
699
pub const fn strict_sub_unsigned( self , rhs: $UnsignedT) -> Self {
696
700
let ( a, b) = self . overflowing_sub_unsigned( rhs) ;
697
701
if unlikely!( b) { overflow_panic:: sub( ) } else { a}
@@ -745,6 +749,7 @@ macro_rules! int_impl {
745
749
#[ must_use = "this returns the result of the operation, \
746
750
without modifying the original"]
747
751
#[ inline]
752
+ #[ track_caller]
748
753
pub const fn strict_mul( self , rhs: Self ) -> Self {
749
754
let ( a, b) = self . overflowing_mul( rhs) ;
750
755
if unlikely!( b) { overflow_panic:: mul( ) } else { a}
@@ -840,6 +845,7 @@ macro_rules! int_impl {
840
845
#[ must_use = "this returns the result of the operation, \
841
846
without modifying the original"]
842
847
#[ inline]
848
+ #[ track_caller]
843
849
pub const fn strict_div( self , rhs: Self ) -> Self {
844
850
let ( a, b) = self . overflowing_div( rhs) ;
845
851
if unlikely!( b) { overflow_panic:: div( ) } else { a}
@@ -909,6 +915,7 @@ macro_rules! int_impl {
909
915
#[ must_use = "this returns the result of the operation, \
910
916
without modifying the original"]
911
917
#[ inline]
918
+ #[ track_caller]
912
919
pub const fn strict_div_euclid( self , rhs: Self ) -> Self {
913
920
let ( a, b) = self . overflowing_div_euclid( rhs) ;
914
921
if unlikely!( b) { overflow_panic:: div( ) } else { a}
@@ -977,6 +984,7 @@ macro_rules! int_impl {
977
984
#[ must_use = "this returns the result of the operation, \
978
985
without modifying the original"]
979
986
#[ inline]
987
+ #[ track_caller]
980
988
pub const fn strict_rem( self , rhs: Self ) -> Self {
981
989
let ( a, b) = self . overflowing_rem( rhs) ;
982
990
if unlikely!( b) { overflow_panic:: rem( ) } else { a}
@@ -1045,6 +1053,7 @@ macro_rules! int_impl {
1045
1053
#[ must_use = "this returns the result of the operation, \
1046
1054
without modifying the original"]
1047
1055
#[ inline]
1056
+ #[ track_caller]
1048
1057
pub const fn strict_rem_euclid( self , rhs: Self ) -> Self {
1049
1058
let ( a, b) = self . overflowing_rem_euclid( rhs) ;
1050
1059
if unlikely!( b) { overflow_panic:: rem( ) } else { a}
@@ -1121,6 +1130,7 @@ macro_rules! int_impl {
1121
1130
#[ must_use = "this returns the result of the operation, \
1122
1131
without modifying the original"]
1123
1132
#[ inline]
1133
+ #[ track_caller]
1124
1134
pub const fn strict_neg( self ) -> Self {
1125
1135
let ( a, b) = self . overflowing_neg( ) ;
1126
1136
if unlikely!( b) { overflow_panic:: neg( ) } else { a}
@@ -1174,6 +1184,7 @@ macro_rules! int_impl {
1174
1184
#[ must_use = "this returns the result of the operation, \
1175
1185
without modifying the original"]
1176
1186
#[ inline]
1187
+ #[ track_caller]
1177
1188
pub const fn strict_shl( self , rhs: u32 ) -> Self {
1178
1189
let ( a, b) = self . overflowing_shl( rhs) ;
1179
1190
if unlikely!( b) { overflow_panic:: shl( ) } else { a}
@@ -1254,6 +1265,7 @@ macro_rules! int_impl {
1254
1265
#[ must_use = "this returns the result of the operation, \
1255
1266
without modifying the original"]
1256
1267
#[ inline]
1268
+ #[ track_caller]
1257
1269
pub const fn strict_shr( self , rhs: u32 ) -> Self {
1258
1270
let ( a, b) = self . overflowing_shr( rhs) ;
1259
1271
if unlikely!( b) { overflow_panic:: shr( ) } else { a}
@@ -1337,6 +1349,7 @@ macro_rules! int_impl {
1337
1349
#[ must_use = "this returns the result of the operation, \
1338
1350
without modifying the original"]
1339
1351
#[ inline]
1352
+ #[ track_caller]
1340
1353
pub const fn strict_abs( self ) -> Self {
1341
1354
if self . is_negative( ) {
1342
1355
self . strict_neg( )
@@ -1410,6 +1423,7 @@ macro_rules! int_impl {
1410
1423
#[ must_use = "this returns the result of the operation, \
1411
1424
without modifying the original"]
1412
1425
#[ inline]
1426
+ #[ track_caller]
1413
1427
pub const fn strict_pow( self , mut exp: u32 ) -> Self {
1414
1428
if exp == 0 {
1415
1429
return 1 ;
0 commit comments