Closed
Description
I'm seeing an internal compiler error on the following input (found by fuzz-rustc):
struct Foo { 0: u8 }
fn test(f: Foo) {
Foo{foo: 4, ..f};
}
fn main() {}
$ rustc main.rs
error: expected identifier, found `0`
--> main.rs:1:14
|
1 | struct Foo { 0: u8 }
| ^ expected identifier
error: internal compiler error: src/librustc_typeck/check/mod.rs:3328: no type for node HirId { owner: DefIndex(4), local_id: 4 }: expr f (hir_id=HirId { owner: DefIndex(4), local_id: 4 }) in fcx 0x7fdb535efe40
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:881: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.43.0-nightly (8aa9d2014 2020-02-21) running on x86_64-unknown-linux-gnu
error: aborting due to 2 previous errors
The error happens on stable
, beta
, and nightly
.
Metadata
Metadata
Assignees
Labels
Area: Type systemCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️High priorityRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.Performance or correctness regression from one stable version to another.