Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dwrensha opened this issue Apr 3, 2020 · 3 comments · Fixed by #70739
Closed

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

dwrensha opened this issue Apr 3, 2020 · 3 comments · Fixed by #70739
Assignees
Labels
A-async-await A-diagnostics A-resolve I-ICE P-medium T-compiler

Comments

@dwrensha
Copy link
Contributor

@dwrensha dwrensha commented Apr 3, 2020

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
@dwrensha
Copy link
Contributor Author

@dwrensha dwrensha commented Apr 3, 2020

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

@Centril Centril added A-diagnostics T-compiler labels Apr 3, 2020
@jonas-schievink
Copy link
Member

@jonas-schievink jonas-schievink commented Apr 3, 2020

Maybe due to #70011? cc @petrochenkov

@Centril Centril added I-ICE P-medium I-nominated A-resolve A-async-await labels Apr 3, 2020
@Centril Centril self-assigned this Apr 3, 2020
@Centril
Copy link
Contributor

@Centril Centril commented Apr 3, 2020

Fixed by #70739.

@bors bors closed this as completed in 17fa344 Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await A-diagnostics A-resolve I-ICE P-medium T-compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants