-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Unusual Panic Location for Dividing by a Reference to Zero #114814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Full output of
|
That goes through this trait implementation: https://doc.rust-lang.org/std/primitive.i32.html#impl-Div%3C%26i32%3E-for-i32 So technically it's happening there, but I agree that's not helpful. Want to try making a PR to add |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 6, 2023
fix: add track_caller attr for div and mod Fixes rust-lang#114814 `#[track_caller]` is works, r? `@scottmcm`
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 14, 2023
add track_caller for arith ops Fixes rust-lang#114814 `#[track_caller]` is works, r? `@scottmcm`
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 19, 2023
add track_caller for arith ops Fixes rust-lang#114814 `#[track_caller]` is works, r? `@scottmcm`
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 23, 2023
add track_caller for arith ops Fixes rust-lang#114814 `#[track_caller]` is works, r? `@scottmcm`
TaKO8Ki
added a commit
to TaKO8Ki/rust
that referenced
this issue
Nov 9, 2023
add track_caller for arith ops Fixes rust-lang#114814 `#[track_caller]` is works, r? ``@scottmcm``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this code:
I expected to see this happen: program panics with
main.rs
or the actual location on disk of the standard library source code file that caused the panic given as the locationInstead, this happened: program gives
/rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/arith.rs:484:1
(internal compiler location?) as the panic locationMeta
rustc --version --verbose
:I also checked that it happened in WSL:
rustc --version --verbose
:Backtrace
No build errors, but the backtrace for the program also contains references to internal compiler locations that I would expect to point to the actual locations of standard library source files on disk, as well.
The text was updated successfully, but these errors were encountered: