Skip to content

'rustc' panicked at 'forcing query with already existing DepNode #7373

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

Closed
rossmacarthur opened this issue Jun 18, 2021 · 2 comments
Closed
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@rossmacarthur
Copy link

rossmacarthur commented Jun 18, 2021

Tried to run --fix with

clippy::unnested_or_patterns

Code

I don't have a minimal verifiable example yet. I will try and get an MCVE later this weekend, theres a lot of code in this repo. I tried to compile this project. By running:

cargo +nightly clippy --fix -Z unstable-options --allow-dirty -- -A clippy::all -D clippy::unnested_or_patterns

Meta

  • cargo clippy -V:
    clippy 0.1.54 (a85f584a 2021-06-16)
    
  • rustc -Vv:
    rustc 1.55.0-nightly (149f4836d 2021-06-17)
    binary: rustc
    commit-hash: 149f4836dd6d9e789a26dca16dc034588866894e
    commit-date: 2021-06-17
    host: x86_64-apple-darwin
    release: 1.55.0-nightly
    LLVM version: 12.0.1
    

Error output

thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: &str }
- dep-node: layout_raw(ad738982f22c678a-9e7e0f2c32792904)', /rustc/149f4836dd6d9e789a26dca16dc034588866894e/compiler/rustc_query_system/src/query/plumbing.rs:645:5
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-clippy/issues/new

note: Clippy version: clippy 0.1.54 (149f4836 2021-06-17)
Backtrace

thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: &str }
- dep-node: layout_raw(ad738982f22c678a-9e7e0f2c32792904)', /rustc/149f4836dd6d9e789a26dca16dc034588866894e/compiler/rustc_query_system/src/query/plumbing.rs:645:5
stack backtrace:
 0: _rust_begin_unwind
 1: std::panicking::begin_panic_fmt
 2: rustc_query_system::query::plumbing::get_query_impl
 3: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw
 4: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
 5: <rustc_lint::context::LateContext as rustc_target::abi::LayoutOf>::layout_of
 6: <clippy_lints::zero_sized_map_values::ZeroSizedMapValues as rustc_lint::passes::LateLintPass>::check_ty
 7: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_ty
 8: rustc_hir::intravisit::walk_ty
 9: rustc_hir::intravisit::walk_fn
10: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_fn
11: rustc_hir::intravisit::walk_item
12: rustc_hir::intravisit::Visitor::visit_nested_item
13: rustc_hir::intravisit::walk_crate
14: rustc_lint::late::late_lint_pass_crate
15: rustc_lint::late::late_lint_crate
16: rustc_data_structures::sync::join
17: rustc_interface::passes::analysis::{{closure}}::{{closure}}
18: rustc_session::utils::<impl rustc_session::session::Session>::time
19: rustc_interface::passes::analysis
20: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
21: rustc_data_structures::stack::ensure_sufficient_stack
22: rustc_query_system::query::plumbing::force_query_with_job
23: rustc_query_system::query::plumbing::get_query_impl
24: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
25: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
26: rustc_span::with_source_map
27: rustc_interface::interface::create_compiler_and_run
28: scoped_tls::ScopedKey<T>::set
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.54 (149f4836 2021-06-17)

@rossmacarthur rossmacarthur added C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ labels Jun 18, 2021
@jyn514
Copy link
Member

jyn514 commented Jun 21, 2021

Likely a duplicate of rust-lang/rust#79847; but even if not, this should be reported to rust-lang/rust, not clippy, there's not much clippy can do.

@rossmacarthur
Copy link
Author

Agreed, I have reduced the error and commented there 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants