-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE Type parameter out of range when substituting #57781
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-type-system
Area: Type system
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Crashes on stable and beta but not on nightly anymore. Here's an MCVE. use std::cell::UnsafeCell;
use std::collections::HashMap;
struct OnceCell<T> {
_value: UnsafeCell<Option<T>>,
}
impl<T> OnceCell<T> {
const INIT: OnceCell<T> = OnceCell {
_value: UnsafeCell::new(None),
};
}
pub fn crash<K, T>() {
let _ = OnceCell::<HashMap<K, T>>::INIT;
} One might want to add an test to the collection. Also this test is very specific to the |
varkor
added a commit
to varkor/rust
that referenced
this issue
Feb 26, 2019
Centril
added a commit
to Centril/rust
that referenced
this issue
Feb 27, 2019
…hton Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes rust-lang#10876. Closes rust-lang#22892. Closes rust-lang#26448. Closes rust-lang#26577. Closes rust-lang#26619. Closes rust-lang#27054. Closes rust-lang#28587. Closes rust-lang#44127. Closes rust-lang#44255. Closes rust-lang#55731. Closes rust-lang#57781.
varkor
added a commit
to varkor/rust
that referenced
this issue
Feb 27, 2019
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Mar 1, 2019
…hton Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes rust-lang#10876. Closes rust-lang#22892. Closes rust-lang#26448. Closes rust-lang#26577. Closes rust-lang#26619. Closes rust-lang#27054. Closes rust-lang#28587. Closes rust-lang#44127. Closes rust-lang#44255. Closes rust-lang#55731. Closes rust-lang#57781.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 9, 2019
…hton Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes rust-lang#10876. Closes rust-lang#22892. Closes rust-lang#26448. Closes rust-lang#26577. Closes rust-lang#26619. Closes rust-lang#27054. Closes rust-lang#28587. Closes rust-lang#44127. Closes rust-lang#44255. Closes rust-lang#55731. Closes rust-lang#57781.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 9, 2019
…hton Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes rust-lang#10876. Closes rust-lang#22892. Closes rust-lang#26448. Closes rust-lang#26577. Closes rust-lang#26619. Closes rust-lang#27054. Closes rust-lang#28587. Closes rust-lang#44127. Closes rust-lang#44255. Closes rust-lang#55731. Closes rust-lang#57781.
varkor
added a commit
to varkor/rust
that referenced
this issue
Mar 11, 2019
bors
added a commit
that referenced
this issue
Mar 12, 2019
Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes #10876. Closes #26448. Closes #26577. Closes #26619. Closes #27054. Closes #44127. Closes #44255. Closes #55731. Closes #57781.
varkor
added a commit
to varkor/rust
that referenced
this issue
Mar 12, 2019
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Mar 12, 2019
…hton Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes rust-lang#10876. Closes rust-lang#26448. Closes rust-lang#26577. Closes rust-lang#26619. Closes rust-lang#27054. Closes rust-lang#44127. Closes rust-lang#44255. Closes rust-lang#55731. Closes rust-lang#57781.
bors
added a commit
that referenced
this issue
Mar 12, 2019
Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes #10876. Closes #26448. Closes #26577. Closes #26619. Closes #27054. Closes #44127. Closes #44255. Closes #55731. Closes #57781.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-type-system
Area: Type system
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Both nightly and stable ICE on this code:
I expected to see this happen:
This should either compile or throw an Error explaining why it is invalid.
Instead, this happened:
Both
cargo build
andcargo +nightly build
throw an ICE.Meta
installed dependencies:
rustc --version --verbose
:rustc 1.32.0 (9fda7c2 2019-01-16)
binary: rustc
commit-hash: 9fda7c2
commit-date: 2019-01-16
host: x86_64-unknown-linux-gnu
release: 1.32.0
LLVM version: 8.0
rustc +nightly --version --verbose
:rustc 1.33.0-nightly (0c0c585 2019-01-19)
binary: rustc
commit-hash: 0c0c585
commit-date: 2019-01-19
host: x86_64-unknown-linux-gnu
release: 1.33.0-nightly
LLVM version: 8.0
Backtrace:
Note:
There are multiple issues with similar titles, sorry if this is a duplicate.
Most other issues I could find seem to only affect nightly, this crashes on stable, too. #57700 panics during
mir_borrowck
, this inoptimized_mir
.The text was updated successfully, but these errors were encountered: