This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 67ec93b
authored
Unrolled build for rust-lang#137207
Rollup merge of rust-lang#137207 - petertodd:2025-add-track-caller-to-duration-div, r=jhpratt
Add #[track_caller] to Duration Div impl
Previously the location of the divide-by-zero error condition would be attributed to the code in the rust standard library, eg:
thread 'main' panicked at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/time.rs:1172:31:
divide by zero error when dividing duration by scalar
With #[track_caller] the error is correctly attributed to the callee.1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
| 1171 | + | |
1171 | 1172 | | |
1172 | 1173 | | |
1173 | 1174 | | |
| |||
1176 | 1177 | | |
1177 | 1178 | | |
1178 | 1179 | | |
| 1180 | + | |
1179 | 1181 | | |
1180 | 1182 | | |
1181 | 1183 | | |
| |||
0 commit comments