-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ICE combining specialization with associated constants as array lengths #50439
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-specialization
Area: Trait impl specialization
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-specialization
`#![feature(specialization)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Closed
The test case overflows on Compiling playground v0.0.1 (/playground)
error[E0275]: overflow evaluating the requirement `Bears<_>: std::marker::Sized`
|
= help: consider adding a `#![recursion_limit="128"]` attribute to your crate
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
= note: required because of the requirements on the impl of `ReflectDrop` for `Bears<_>`
error: aborting due to previous error |
The code doesn't produce ICE anymore (tested on
|
this no longer crashes |
TaKO8Ki
added a commit
to TaKO8Ki/rust
that referenced
this issue
Jun 30, 2022
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 2, 2022
Rollup of 6 pull requests Successful merges: - rust-lang#98701 (Add regression test for rust-lang#50439) - rust-lang#98715 (add ice test for rust-lang#97047) - rust-lang#98753 (Fix `x dist rust-dev` on a fresh checkout) - rust-lang#98805 (Add rust-lang#95469 to the release notes) - rust-lang#98812 (feat: Add a documentation problem issue template) - rust-lang#98819 (update Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-specialization
Area: Trait impl specialization
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-specialization
`#![feature(specialization)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Testcase:
I was mostly fooling around trying to see if there was any way I could get rustc to believe that it would always know whether Bears was Drop regardless of T; for the test case, I changed it to Clone and got rid of actually setting the constant to true in the default case, as well as some unsafe keywords, to avoid muddying the waters with Drop's semantics. Note that the array trick for turning a constant into a compile time error comes from https://github.com/nvzqz/static-assertions-rs, so it's not as contrived as it initially appears.
Stacktrace:
The text was updated successfully, but these errors were encountered: