-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
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) ❄️P-highHigh priorityHigh priorityT-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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
This short snippet crashes the nightly compiler:
enum Foo {
Bar(usize),
}
fn main() {
let i = Foo::Bar;
assert_eq!(Foo::Bar, i);
}
Crashes with:
error: internal compiler error: src/librustc_typeck/check/mod.rs:825: can't type-check body of DefId(0/1:10 ~ lib[317d]::Foo[0]::Bar[0]::{{constructor}}[0])
--> src/lib.rs:2:3
|
2 | Bar(usize),
| ^^^^^^^^^^
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:570:9
rustc 1.35.0-nightly (70f1309 2019-04-16) running on x86_64-apple-darwin
Seems to work on stable on the playground (don't have stable locally).
hellow554
Metadata
Metadata
Assignees
Labels
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) ❄️P-highHigh priorityHigh priorityT-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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.