Skip to content

internal compiler error: no type for node HirId ... #69378

Description

@dwrensha

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions