-
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)C-bugCategory: This is a bug.Category: This is a bug.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
This very simple example (Playground link):
#![feature(const_generics)]
struct Generic<const V: usize>;
fn main() {
let _ = Generic::<0>;
}
results in: error: internal compiler error: src/librustc_typeck/collect.rs:1407: unexpected const parent path def Def(Ctor(Struct, Const), DefId(0:13 ~ playground[d52b]::Generic[0]::{{constructor}}[0]))
. Changing it to use curly braces around 0
does not help.
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.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.