-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rustc stable panics when optimizing MIR, attempting to unwrap trait object #86351
Comments
also happens on nightly |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
Issue: rust-lang/rust#86351
Issue: rust-lang/rust#86351
This ICE still exists, but the "internal compiler error" and "query stack during panic" sections of the error output have changed on 1.58.0-nightly. Meta
I'm running this on a different machine than the one I initially posted the issue from. Error Output
The output in 1.56.1-stable is still the same as it was when I originally posted the issue. Backtrace
|
Additionally, the new ICE now happens when the code is compiled into an executable, but only on nightly. This didn't happen before. On 1.56.1-stable in src/main.rs, the compiler emits a warning that Edit: the error now happens on 1.60.0 stable when compiling in a binary as well. |
Triage: the issue has been fixed on the latest nightly, marking as |
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
…errors Add regression test for rust-lang#86351 r? `@compiler-errors` Closes rust-lang#86351
Rollup of 7 pull requests Successful merges: - rust-lang#109909 (Deny `use`ing tool paths) - rust-lang#109921 (Don't ICE when encountering `dyn*` in statics or consts) - rust-lang#109922 (Disable `has_thread_local` on OpenHarmony) - rust-lang#109926 (write threads info into log only when debugging) - rust-lang#109968 (Add regression test for rust-lang#80409) - rust-lang#109969 (Add regression test for rust-lang#86351) - rust-lang#109973 (rustdoc: Improve logo display very small screen) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Code
This only happens when compiled in a library, not an executable.
The associated type
MyType
, both of thewhere Self: Sized
's, theOption<Self>
(instead of justSelf
), and the match statement are all needed to make it panic.Replacing the match statement with
Some(Self::func().unwrap())
errors gracefully, and says that I cannot call unwrap on a trait object; so I assume the error that should have been emitted for the match statement is that I cannot destructure a trait object.Replacing the match with
Self::func()
compiles successfully.Meta
This happens on stable, nightly, and beta.
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: