@@ -98,6 +98,7 @@ macro_rules! add_impl {
9898 type Output = $t;
9999
100100 #[ inline]
101+ #[ track_caller]
101102 #[ rustc_inherit_overflow_checks]
102103 fn add( self , other: $t) -> $t { self + other }
103104 }
@@ -206,6 +207,7 @@ macro_rules! sub_impl {
206207 type Output = $t;
207208
208209 #[ inline]
210+ #[ track_caller]
209211 #[ rustc_inherit_overflow_checks]
210212 fn sub( self , other: $t) -> $t { self - other }
211213 }
@@ -335,6 +337,7 @@ macro_rules! mul_impl {
335337 type Output = $t;
336338
337339 #[ inline]
340+ #[ track_caller]
338341 #[ rustc_inherit_overflow_checks]
339342 fn mul( self , other: $t) -> $t { self * other }
340343 }
@@ -474,6 +477,7 @@ macro_rules! div_impl_integer {
474477 type Output = $t;
475478
476479 #[ inline]
480+ #[ track_caller]
477481 fn div( self , other: $t) -> $t { self / other }
478482 }
479483
@@ -575,6 +579,7 @@ macro_rules! rem_impl_integer {
575579 type Output = $t;
576580
577581 #[ inline]
582+ #[ track_caller]
578583 fn rem( self , other: $t) -> $t { self % other }
579584 }
580585
@@ -749,6 +754,7 @@ macro_rules! add_assign_impl {
749754 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
750755 impl AddAssign for $t {
751756 #[ inline]
757+ #[ track_caller]
752758 #[ rustc_inherit_overflow_checks]
753759 fn add_assign( & mut self , other: $t) { * self += other }
754760 }
@@ -815,6 +821,7 @@ macro_rules! sub_assign_impl {
815821 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
816822 impl SubAssign for $t {
817823 #[ inline]
824+ #[ track_caller]
818825 #[ rustc_inherit_overflow_checks]
819826 fn sub_assign( & mut self , other: $t) { * self -= other }
820827 }
@@ -872,6 +879,7 @@ macro_rules! mul_assign_impl {
872879 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
873880 impl MulAssign for $t {
874881 #[ inline]
882+ #[ track_caller]
875883 #[ rustc_inherit_overflow_checks]
876884 fn mul_assign( & mut self , other: $t) { * self *= other }
877885 }
@@ -929,6 +937,7 @@ macro_rules! div_assign_impl {
929937 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
930938 impl DivAssign for $t {
931939 #[ inline]
940+ #[ track_caller]
932941 fn div_assign( & mut self , other: $t) { * self /= other }
933942 }
934943
@@ -989,6 +998,7 @@ macro_rules! rem_assign_impl {
989998 #[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
990999 impl RemAssign for $t {
9911000 #[ inline]
1001+ #[ track_caller]
9921002 fn rem_assign( & mut self , other: $t) { * self %= other }
9931003 }
9941004
0 commit comments