-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Test code:
#![feature(const_generics)]
use std::mem::MaybeUninit;
#[repr(transparent)]
pub struct OsThreadStack<const N: usize>(MaybeUninit<[u64; N]>);
fn main() {
}
It produced error:
error: internal compiler error: src/librustc/ty/sty.rs:2311: expected constant usize, got Const {
ty: usize,
val: Param(
N/#0,
),
}
Playground version: rustc 1.37.0-nightly (2019-05-29 37d001e)
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.