Skip to content

internal compiler error: no entry found for key #71297

Closed
@dwrensha

Description

@dwrensha

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

async fn a(x | s: String) {}
fn main() {}
$ rustc --edition=2018 main.rs 
error: an or-pattern parameter must be wrapped in parenthesis
 --> main.rs:1:12
  |
1 | async fn a(x | s: String) {}
  |            ^^^^^ help: wrap the pattern in parenthesis: `(x | s)`

error[E0408]: variable `x` is not bound in all patterns
 --> main.rs:1:16
  |
1 | async fn a(x | s: String) {}
  |            -   ^ pattern doesn't bind `x`
  |            |
  |            variable not in all patterns

error[E0408]: variable `s` is not bound in all patterns
 --> main.rs:1:12
  |
1 | async fn a(x | s: String) {}
  |            ^   - variable not in all patterns
  |            |
  |            pattern doesn't bind `s`

thread 'rustc' panicked at 'no entry found for key', src/librustc_mir_build/build/mod.rs:343:9
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.44.0-nightly (ce93331e2 2020-04-17) running on x86_64-unknown-linux-gnu

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0408`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow 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-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions