Skip to content

internal compiler error: local_def_id: no entry for HirId { owner ... #70736

Closed

Description

@dwrensha

I'm seeing an internal compiler error on the following input (found by fuzz-rustc):

async fn foo();
fn main() {}
$ rustc --edition=2018 main.rs
error: free function without a body
 --> main.rs:1:1
  |
1 | async fn foo();
  | ^^^^^^^^^^^^^^-
  |               |
  |               help: provide a definition for the function: `{ <body> }`

error: internal compiler error: src/librustc_middle/hir/map/mod.rs:177: local_def_id: no entry for `HirId { owner: DefId(0:3 ~ main[317d]::foo[0]), local_id: 8 }`, which has a map of `Some(Entry { parent: HirId { owner: DefId(0:3 ~ main[317d]::foo[0]), local_id: 14 }, node: Expr(Expr { hir_id: HirId { owner: DefId(0:3 ~ main[317d]::foo[0]), local_id: 8 }, kind: Closure(Value, FnDecl { inputs: [Ty { hir_id: HirId { owner: DefId(0:3 ~ main[317d]::foo[0]), local_id: 1 }, kind: Infer, span: main.rs:1:1: 1:16 }], output: DefaultReturn(main.rs:1:1: 1:16), c_variadic: false, implicit_self: None }, BodyId { hir_id: HirId { owner: DefId(0:3 ~ main[317d]::foo[0]), local_id: 7 } }, main.rs:1:1: 1:16, Some(Static)), attrs: ThinVec(None), span: main.rs:1:1: 1:16 }) })`

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:880: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.44.0-nightly (76b11980a 2020-04-01) running on x86_64-unknown-linux-gnu

error: aborting due to 2 previous errors

Activity

  1. dwrensha commented on Apr 3, 2020

    @dwrensha
    ContributorAuthor

    Report from cargo-bisect-rustc:

    searched nightlies: from nightly-2020-03-09 to nightly-2020-04-03
    regressed nightly: nightly-2020-03-16
    searched commits: from 7cdbc87 to 45ebd58
    regressed commit: e0f5df0

  2. added
    A-diagnosticsArea: Messages for errors, warnings, and lints
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Apr 3, 2020
  3. jonas-schievink commented on Apr 3, 2020

    @jonas-schievink
    Contributor

    Maybe due to #70011? cc @petrochenkov

  4. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
    on Apr 3, 2020
  5. self-assigned this
    on Apr 3, 2020
  6. Centril commented on Apr 3, 2020

    @Centril
    Contributor

    Fixed by #70739.

  7. added a commit that references this issue on Apr 6, 2020
    17fa344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitA-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions