@@ -98,6 +98,7 @@ macro_rules! add_impl {
98
98
type Output = $t;
99
99
100
100
#[ inline]
101
+ #[ track_caller]
101
102
#[ rustc_inherit_overflow_checks]
102
103
fn add( self , other: $t) -> $t { self + other }
103
104
}
@@ -206,6 +207,7 @@ macro_rules! sub_impl {
206
207
type Output = $t;
207
208
208
209
#[ inline]
210
+ #[ track_caller]
209
211
#[ rustc_inherit_overflow_checks]
210
212
fn sub( self , other: $t) -> $t { self - other }
211
213
}
@@ -335,6 +337,7 @@ macro_rules! mul_impl {
335
337
type Output = $t;
336
338
337
339
#[ inline]
340
+ #[ track_caller]
338
341
#[ rustc_inherit_overflow_checks]
339
342
fn mul( self , other: $t) -> $t { self * other }
340
343
}
@@ -474,6 +477,7 @@ macro_rules! div_impl_integer {
474
477
type Output = $t;
475
478
476
479
#[ inline]
480
+ #[ track_caller]
477
481
fn div( self , other: $t) -> $t { self / other }
478
482
}
479
483
@@ -575,6 +579,7 @@ macro_rules! rem_impl_integer {
575
579
type Output = $t;
576
580
577
581
#[ inline]
582
+ #[ track_caller]
578
583
fn rem( self , other: $t) -> $t { self % other }
579
584
}
580
585
@@ -749,6 +754,7 @@ macro_rules! add_assign_impl {
749
754
#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
750
755
impl AddAssign for $t {
751
756
#[ inline]
757
+ #[ track_caller]
752
758
#[ rustc_inherit_overflow_checks]
753
759
fn add_assign( & mut self , other: $t) { * self += other }
754
760
}
@@ -815,6 +821,7 @@ macro_rules! sub_assign_impl {
815
821
#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
816
822
impl SubAssign for $t {
817
823
#[ inline]
824
+ #[ track_caller]
818
825
#[ rustc_inherit_overflow_checks]
819
826
fn sub_assign( & mut self , other: $t) { * self -= other }
820
827
}
@@ -872,6 +879,7 @@ macro_rules! mul_assign_impl {
872
879
#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
873
880
impl MulAssign for $t {
874
881
#[ inline]
882
+ #[ track_caller]
875
883
#[ rustc_inherit_overflow_checks]
876
884
fn mul_assign( & mut self , other: $t) { * self *= other }
877
885
}
@@ -929,6 +937,7 @@ macro_rules! div_assign_impl {
929
937
#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
930
938
impl DivAssign for $t {
931
939
#[ inline]
940
+ #[ track_caller]
932
941
fn div_assign( & mut self , other: $t) { * self /= other }
933
942
}
934
943
@@ -989,6 +998,7 @@ macro_rules! rem_assign_impl {
989
998
#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
990
999
impl RemAssign for $t {
991
1000
#[ inline]
1001
+ #[ track_caller]
992
1002
fn rem_assign( & mut self , other: $t) { * self %= other }
993
1003
}
994
1004
0 commit comments