rust-lang / rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
https://rust-lang.github.io/rust-clippy/
Other
11.24k stars 1.51k forks source link

ICE found while compiling workspace #8775

Closed CPerezz closed 2 years ago

CPerezz commented 2 years ago

Summary

I haven't been able to create a minimum example to reproduce this. The only thing I've been able to check is that the error is consistent and happens at each execution.

To reproduce, fetch https://github.com/appliedzkp/zkevm-circuits at commit: 2ba42e8fadcd6a10b4440f42d5abdefe9571524e and run make test-all. This triggers clippy for each workspace member (takes less than 30 sec to run) and you should get the same panic.

Version

rustc 1.58.0-nightly (d914f17ca 2021-11-16)
binary: rustc
commit-hash: d914f17ca71a33a89b2dc3436fca51b1a091559e
commit-date: 2021-11-16
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0

Error output

Backtrace

``` thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:18:85 stack backtrace: 0: rust_begin_unwind at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:498:5 1: core::panicking::panic_fmt at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panicking.rs:106:14 2: core::panicking::panic at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panicking.rs:47:5 3: ::def_path_hash_to_def_id 4: as rustc_middle::dep_graph::dep_node::DepNodeExt>::extract_def_id 5: rustc_query_impl::query_callbacks::adt_def::force_from_dep_node 6: ::try_force_from_dep_node 7: >::try_mark_previous_green:: 8: rustc_query_system::query::plumbing::ensure_must_run:: 9: rustc_query_system::query::plumbing::get_query:: 10: ::for_each_module:: 11: ::time::<(), rustc_interface::passes::analysis::{closure#1}::{closure#1}::{closure#0}> 12: ::time::<(), rustc_interface::passes::analysis::{closure#1}> 13: rustc_interface::passes::analysis 14: >::with_task::> 15: rustc_data_structures::stack::ensure_sufficient_stack::<(core::result::Result<(), rustc_errors::ErrorReported>, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job>::{closure#3}> 16: rustc_query_system::query::plumbing::try_execute_query::>> 17: rustc_query_system::query::plumbing::get_query:: 18: ::enter::> 19: ::enter::, rustc_errors::ErrorReported>> 20: rustc_span::with_source_map::, rustc_interface::interface::create_compiler_and_run, rustc_driver::run_compiler::{closure#1}>::{closure#1}> 21: rustc_interface::interface::create_compiler_and_run::, rustc_driver::run_compiler::{closure#1}> 22: >::set::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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-clippy/issues/new note: Clippy version: clippy 0.1.58 (d914f17 2021-11-16) query stack during panic: #0 [analysis] running analysis passes on this crate end of query stack error: could not compile `zkevm-circuits` ```

giraffate commented 2 years ago

Thanks for the report!

It seems to be a duplicate of https://github.com/rust-lang/rust-clippy/issues/8254, so I'm closing this.