Commit 8b86f48
committed
Auto merge of #153480 - RaphiMuehlbacher:track-caller, r=Mark-Simulacrum
Add missing `track_caller` to overflowing trait methods
Fixes #152599 by adding `#[track_caller]` to arithmetic trait methods (`Neg`, `Shl`, `ShlAssign`, `Shr` and `ShrAssign`) so overflow panics report the correct call site instead of the trait definition.2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| 719 | + | |
719 | 720 | | |
720 | 721 | | |
721 | 722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
| |||
606 | 607 | | |
607 | 608 | | |
608 | 609 | | |
| 610 | + | |
609 | 611 | | |
610 | 612 | | |
611 | 613 | | |
| |||
958 | 960 | | |
959 | 961 | | |
960 | 962 | | |
| 963 | + | |
961 | 964 | | |
962 | 965 | | |
963 | 966 | | |
| |||
1044 | 1047 | | |
1045 | 1048 | | |
1046 | 1049 | | |
| 1050 | + | |
1047 | 1051 | | |
1048 | 1052 | | |
1049 | 1053 | | |
| |||
0 commit comments