Closed
Description
This code
fn main() {
async { yield print!(":C") };
}
produces ICE on current beta and nightly
thread 'rustc' panicked at 'src/librustc/hir/map/hir_id_validator.rs:26:
ItemLocalIds not assigned densely in ::main[0]. Max ItemLocalId = 14, missing IDs = ["[local_id: 1, node:unknown node (hir_id=HirId { owner: DefIndex(12), local_id: 1 })]"]; seens IDs = ["(HirId { owner: DefIndex(12), local_id: 0 } fn main (hir_id=HirId { owner: DefIndex(12), local_id: 0 }))", "(HirId { owner: DefIndex(12), local_id: 13 } block { ::std::future::from_generator(|| { (/*ERROR*/) }); } (hir_id=HirId { owner: DefIndex(12), local_id: 13 }))", "(HirId { owner: DefIndex(12), local_id: 10 } expr ::std::future::from_generator (hir_id=HirId { owner: DefIndex(12), local_id: 10 }))", "(HirId { owner: DefIndex(12), local_id: 7 } path segment std (hir_id=HirId { owner: DefIndex(12), local_id: 7 }))", "(HirId { owner: DefIndex(12), local_id: 4 } expr { (/*ERROR*/) } (hir_id=HirId { owner: DefIndex(12), local_id: 4 }))", "(HirId { owner: DefIndex(12), local_id: 14 } expr { ::std::future::from_generator(|| { (/*ERROR*/) }); } (hir_id=HirId { owner: DefIndex(12), local_id: 14 }))", "(HirId { owner: DefIndex(12), local_id: 11 } expr ::std::future::from_generator(|| { (/*ERROR*/) }) (hir_id=HirId { owner: DefIndex(12), local_id: 11 }))", "(HirId { owner: DefIndex(12), local_id: 8 } path segment future (hir_id=HirId { owner: DefIndex(12), local_id: 8 }))", "(HirId { owner: DefIndex(12), local_id: 5 } expr || { (/*ERROR*/) } (hir_id=HirId { owner: DefIndex(12), local_id: 5 }))", "(HirId { owner: DefIndex(12), local_id: 2 } expr (/*ERROR*/) (hir_id=HirId { owner: DefIndex(12), local_id: 2 }))", "(HirId { owner: DefIndex(12), local_id: 12 } stmt ::std::future::from_generator(|| { (/*ERROR*/) }); (hir_id=HirId { owner: DefIndex(12), local_id: 12 }))", "(HirId { owner: DefIndex(12), local_id: 9 } path segment from_generator (hir_id=HirId { owner: DefIndex(12), local_id: 9 }))", "(HirId { owner: DefIndex(12), local_id: 6 } path segment (hir_id=HirId { owner: DefIndex(12), local_id: 6 }))", "(HirId { owner: DefIndex(12), local_id: 3 } block { (/*ERROR*/) } (hir_id=HirId { owner: DefIndex(12), local_id: 3 }))"]', src/librustc/util/bug.rs:37:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: internal compiler error: unexpected panic
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-beta.2 (2a0ba54fa 2019-11-16) 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 2 previous errors
For more information about this error, try `rustc --explain E0658`.
error: could not compile `rust-games`.
Metadata
Metadata
Assignees
Labels
Area: The high-level intermediate representation (HIR)Area: Async & AwaitArea: CoroutinesArea: Compiler frontend (errors, parsing and HIR)Async-await issues that have been triaged during a working group meeting.Category: This is a bug.`#![feature(coroutines)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Medium 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.