internal compiler error: no entry found for key · Issue #71297 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@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`.