@@ -1141,6 +1141,7 @@ macro_rules! uint_impl {
1141
1141
#[ must_use = "this returns the result of the operation, \
1142
1142
without modifying the original"]
1143
1143
#[ inline]
1144
+ #[ track_caller]
1144
1145
pub const fn saturating_div( self , rhs: Self ) -> Self {
1145
1146
// on unsigned types, there is no overflow in integer division
1146
1147
self . wrapping_div( rhs)
@@ -1275,6 +1276,7 @@ macro_rules! uint_impl {
1275
1276
#[ must_use = "this returns the result of the operation, \
1276
1277
without modifying the original"]
1277
1278
#[ inline( always) ]
1279
+ #[ track_caller]
1278
1280
pub const fn wrapping_div( self , rhs: Self ) -> Self {
1279
1281
self / rhs
1280
1282
}
@@ -1304,6 +1306,7 @@ macro_rules! uint_impl {
1304
1306
#[ must_use = "this returns the result of the operation, \
1305
1307
without modifying the original"]
1306
1308
#[ inline( always) ]
1309
+ #[ track_caller]
1307
1310
pub const fn wrapping_div_euclid( self , rhs: Self ) -> Self {
1308
1311
self / rhs
1309
1312
}
@@ -1331,6 +1334,7 @@ macro_rules! uint_impl {
1331
1334
#[ must_use = "this returns the result of the operation, \
1332
1335
without modifying the original"]
1333
1336
#[ inline( always) ]
1337
+ #[ track_caller]
1334
1338
pub const fn wrapping_rem( self , rhs: Self ) -> Self {
1335
1339
self % rhs
1336
1340
}
@@ -1361,6 +1365,7 @@ macro_rules! uint_impl {
1361
1365
#[ must_use = "this returns the result of the operation, \
1362
1366
without modifying the original"]
1363
1367
#[ inline( always) ]
1368
+ #[ track_caller]
1364
1369
pub const fn wrapping_rem_euclid( self , rhs: Self ) -> Self {
1365
1370
self % rhs
1366
1371
}
@@ -1743,6 +1748,7 @@ macro_rules! uint_impl {
1743
1748
#[ rustc_const_stable( feature = "const_overflowing_int_methods" , since = "1.52.0" ) ]
1744
1749
#[ must_use = "this returns the result of the operation, \
1745
1750
without modifying the original"]
1751
+ #[ track_caller]
1746
1752
pub const fn overflowing_div( self , rhs: Self ) -> ( Self , bool ) {
1747
1753
( self / rhs, false )
1748
1754
}
@@ -1773,6 +1779,7 @@ macro_rules! uint_impl {
1773
1779
#[ rustc_const_stable( feature = "const_euclidean_int_methods" , since = "1.52.0" ) ]
1774
1780
#[ must_use = "this returns the result of the operation, \
1775
1781
without modifying the original"]
1782
+ #[ track_caller]
1776
1783
pub const fn overflowing_div_euclid( self , rhs: Self ) -> ( Self , bool ) {
1777
1784
( self / rhs, false )
1778
1785
}
@@ -1800,6 +1807,7 @@ macro_rules! uint_impl {
1800
1807
#[ rustc_const_stable( feature = "const_overflowing_int_methods" , since = "1.52.0" ) ]
1801
1808
#[ must_use = "this returns the result of the operation, \
1802
1809
without modifying the original"]
1810
+ #[ track_caller]
1803
1811
pub const fn overflowing_rem( self , rhs: Self ) -> ( Self , bool ) {
1804
1812
( self % rhs, false )
1805
1813
}
@@ -1830,6 +1838,7 @@ macro_rules! uint_impl {
1830
1838
#[ rustc_const_stable( feature = "const_euclidean_int_methods" , since = "1.52.0" ) ]
1831
1839
#[ must_use = "this returns the result of the operation, \
1832
1840
without modifying the original"]
1841
+ #[ track_caller]
1833
1842
pub const fn overflowing_rem_euclid( self , rhs: Self ) -> ( Self , bool ) {
1834
1843
( self % rhs, false )
1835
1844
}
@@ -2065,7 +2074,7 @@ macro_rules! uint_impl {
2065
2074
#[ must_use = "this returns the result of the operation, \
2066
2075
without modifying the original"]
2067
2076
#[ inline( always) ]
2068
- #[ rustc_inherit_overflow_checks ]
2077
+ #[ track_caller ]
2069
2078
pub const fn div_euclid( self , rhs: Self ) -> Self {
2070
2079
self / rhs
2071
2080
}
@@ -2094,7 +2103,7 @@ macro_rules! uint_impl {
2094
2103
#[ must_use = "this returns the result of the operation, \
2095
2104
without modifying the original"]
2096
2105
#[ inline( always) ]
2097
- #[ rustc_inherit_overflow_checks ]
2106
+ #[ track_caller ]
2098
2107
pub const fn rem_euclid( self , rhs: Self ) -> Self {
2099
2108
self % rhs
2100
2109
}
@@ -2119,6 +2128,7 @@ macro_rules! uint_impl {
2119
2128
#[ must_use = "this returns the result of the operation, \
2120
2129
without modifying the original"]
2121
2130
#[ inline( always) ]
2131
+ #[ track_caller]
2122
2132
pub const fn div_floor( self , rhs: Self ) -> Self {
2123
2133
self / rhs
2124
2134
}
@@ -2146,7 +2156,7 @@ macro_rules! uint_impl {
2146
2156
#[ must_use = "this returns the result of the operation, \
2147
2157
without modifying the original"]
2148
2158
#[ inline]
2149
- #[ rustc_inherit_overflow_checks ]
2159
+ #[ track_caller ]
2150
2160
pub const fn div_ceil( self , rhs: Self ) -> Self {
2151
2161
let d = self / rhs;
2152
2162
let r = self % rhs;
0 commit comments