Hi! I'm using the github clippy action, and have started to see the following internal compiler error when clippy runs
Checking rustc-ap-rustc_parse v642.0.0
error: internal compiler error: src\librustc_mir\dataflow\generic\engine.rs:315: Switch on discriminant of non-ADT
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-clippy/issues/new
note: Clippy version: clippy 0.0.212 (fc5d0cc5 2020-02-24)
error: aborting due to previous error
This can be seen in https://github.com/elastic/elasticsearch-rs/commit/d0efcc8e174682da9d2cf215f1dacdedaf802b0b/checks?check_suite_id=487235109.
I can reproduce it locally with latest nightly.
Thanks for the report! We also saw that in our CI: https://github.com/rust-lang/rust-clippy/runs/473320782
I've investigated and prepared a fix.
reduced crash sample:
````rust
fn main() {
let _ = || { yield; };
}
````
We also ran into this with the same clippy version and latest nightly
We ran into it as well on artillery:
Clippy version: clippy 0.0.212 (fc5d0cc 2020-02-24)
The bastion-rs artillery CI triggered an ICE: https://github.com/bastion-rs/artillery/pull/12/checks?check_run_id=476772942
{"reason":"compiler-message","package_id":"artillery-core 0.1.0 (path+file:///home/runner/work/artillery/artillery/artillery-core)","target":{"kind":["lib"],"crate_types":["lib"],"name":"artillery-core","src_path":"/home/runner/work/artillery/artillery/artillery-core/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"error: internal compiler error: src/librustc_mir/dataflow/generic/engine.rs:315: Switch on discriminant of non-ADT\n\n","children":[],"code":null,"level":"error: internal compiler error","message":"src/librustc_mir/dataflow/generic/engine.rs:315: Switch on discriminant of non-ADT","spans":[]}}
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-clippy/issues/new
note: Clippy version: clippy 0.0.212 (fc5d0cc 2020-02-24)
Hope it helps :)
Oops, I forgot mentioning here. The proper fix is already submitted on rust-lang/rust and waiting-on-review now: rust-lang/rust#69562
Most helpful comment
Oops, I forgot mentioning here. The proper fix is already submitted on rust-lang/rust and waiting-on-review now: rust-lang/rust#69562