Closed
Description
The following
#![feature(const_generics)]
struct A<T, const N: usize>([T; N]);
impl<T, const N: usize> A<T, {N}> {
fn bar() -> Self {
panic!()
}
fn foo() -> Self {
A::bar()
}
}
fn main() {
println!("Hello, world!");
}
gives
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> src/main.rs:1:12
|
1 | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
error: internal compiler error: src/librustc/ich/impls_ty.rs:209: ty::TyKind::hash_stable() - can't hash a TyVid _#1t.
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:912:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.40.0-nightly (084beb83e 2019-09-27) running on x86_64-apple-darwin
note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: aborting due to previous error
error: could not compile `o`.
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
Area: const generics (parameters and arguments)Area: Incremental compilationCategory: This is a bug.`#![feature(const_generics)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.