Add #[track_caller] to signed integer div/rem methods - #161607
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @Mark-Simulacrum (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
589cdb5 to
bfdeee0
Compare
This comment has been minimized.
This comment has been minimized.
The unsigned counterparts got the attribute in #724fe8f, but the signed side was missed, so panics like `0i32.wrapping_div(0)` point at the library source instead of the caller. Also covers overflowing_div_euclid, which the issue missed but wrapping_div_euclid delegates to, so it would still report the wrong location without it.
bfdeee0 to
e4204a1
Compare
Did you mean something else here? Looks like something tried to use a hex color code instead of an issue/PR number? |
|
r=me with that fixed |
|
that was a commit short hash for the previous track_caller |
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
…-Simulacrum Add #[track_caller] to signed integer div/rem methods Fixes #139672 The unsigned div/rem methods got #[track_caller] in 724fe8f but the signed side was missed. This adds it to the 8 signed methods listed in the issue, including overflowing_div_euclid which the issue missed but wrapping_div_euclid delegates to. No test added, matching the unsigned side. cg_gcc doesn't propagate track_caller through inlined div/rem yet so a runtime check would fail on the gcc-core-tests CI job.
|
💔 Test for 6675d95 failed: CI. Failed job:
|
|
@bors retry |
|
@kiana1kaslana: 🔑 Insufficient privileges: not in review users |
|
@Mark-Simulacrum the i686-msvc-2 job failed with "The hosted runner lost communication with the server", and a few other jobs were cancelled at the same time. I don't have bors privileges, so could you @bors retry when you have a moment? The code itself shouldn't be related — it's just a #[track_caller] addition on signed div/rem methods. |
|
@kiana1kaslana: 🔑 Insufficient privileges: not in review users |
|
@bors retry |
…uwer Rollup of 4 pull requests Successful merges: - #162032 (remove more trivial regions in evaluate_added_goals_and_make_canonical_response) - #161607 (Add #[track_caller] to signed integer div/rem methods) - #162339 (Revert "bootstrap: Enable rustdoc mergeable CCI for std and internal docs #161716") - #162158 (Revise documentation of `NumBuffer` and `format_into()`.)
Rollup merge of #161607 - kiana1kaslana:track-caller-signed-div, r=Mark-Simulacrum Add #[track_caller] to signed integer div/rem methods Fixes #139672 The unsigned div/rem methods got #[track_caller] in 724fe8f but the signed side was missed. This adds it to the 8 signed methods listed in the issue, including overflowing_div_euclid which the issue missed but wrapping_div_euclid delegates to. No test added, matching the unsigned side. cg_gcc doesn't propagate track_caller through inlined div/rem yet so a runtime check would fail on the gcc-core-tests CI job.
Fixes #139672
The unsigned div/rem methods got #[track_caller] in 724fe8f but
the signed side was missed. This adds it to the 8 signed methods
listed in the issue, including overflowing_div_euclid which the
issue missed but wrapping_div_euclid delegates to.
No test added, matching the unsigned side. cg_gcc doesn't
propagate track_caller through inlined div/rem yet so a runtime
check would fail on the gcc-core-tests CI job.