Skip to content

clippy bug "'forcing query with already existing DepNode" #10770

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
laudiacay opened this issue May 12, 2023 · 1 comment
Closed

clippy bug "'forcing query with already existing DepNode" #10770

laudiacay opened this issue May 12, 2023 · 1 comment

Comments

@laudiacay
Copy link

Hi, don't have time to dig into this, but I maybe found a clippy bug...

clippy version: clippy 0.1.70 (a266f11 2023-03-22)
cargo version: cargo 1.70.0-nightly (15d090969 2023-03-21)
rustc version: rustc 1.70.0-nightly (a266f11 2023-03-22)

code: commit hash d1a0b5c36a05a4e8af8a3f030b1fd818d3be0b75 in https://github.com/banyancomputer/s3-server

errors here: https://app.warp.dev/block/cUCEpzrcfdKQuDWyA818jE

@giraffate
Copy link
Contributor

Thanks for the report!

I tried it with backtrace. I found it's duplicate of #10131, so I'm closing this.

thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst }, value: Val(ByRef { alloc: ConstAllocation { .. }, offset: Size(0 bytes) }, hyper::http::HeaderName) }
- dep-node: try_destructure_mir_constant(bac869825b6cf09b-390fe0ca424b87d7)', /rustc/5243ea5c29b136137c36bd773e5baa663790e097/compiler/rustc_query_system/src/dep_graph/graph.rs:316:9
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_query_impl::plumbing::QueryCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::mir::ConstantKind>, core::option::Option<rustc_middle::mir::query::DestructuredConstant>>
   3: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::try_destructure_mir_constant, rustc_query_impl::plumbing::QueryCtxt>
   4: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::try_destructure_mir_constant, rustc_query_impl::plumbing::QueryCtxt, rustc_middle::dep_graph::dep_node::DepKind>
   5: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_destructure_mir_constant
   6: <rustc_middle::ty::context::TyCtxt>::destructure_mir_constant
   7: clippy_lints::non_copy_const::is_value_unfrozen_raw::inner
   8: <clippy_lints::non_copy_const::NonCopyConst as rustc_lint::passes::LateLintPass>::check_item
   9: <rustc_lint::late::RuntimeCombinedLateLintPass as rustc_lint::passes::LateLintPass>::check_item
  10: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_item
  11: rustc_hir::intravisit::walk_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
  12: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_item
  13: rustc_lint::late::late_lint_crate::<rustc_lint::BuiltinCombinedLateLintPass>
  14: <rustc_session::session::Session>::time::<(), rustc_lint::late::check_crate<rustc_lint::BuiltinCombinedLateLintPass, rustc_interface::passes::analysis::{closure#6}::{closure#1}::{closure#2}::{closure#0}::{closure#0}>::{closure#0}::{closure#0}>
  15: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#6}::{closure#1}::{closure#2}::{closure#0}>
  16: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::analysis::{closure#6}::{closure#1}> as core::ops::function::FnOnce<()>>::call_once
  17: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#6}>
  18: rustc_interface::passes::analysis
  19: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_query_impl::plumbing::QueryCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  20: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_query_impl::plumbing::QueryCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  21: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  22: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  23: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  24: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  25: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
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.69 (5243ea5c 2023-02-20)

query stack during panic:
#0 [try_destructure_mir_constant] destructuring MIR constant
#1 [analysis] running analysis passes on this crate
end of query stack
warning: `s3-server` (lib) generated 6 warnings (run `cargo clippy --fix --lib -p s3-server` to apply 6 suggestions)
error: could not compile `s3-server`; 6 warnings emitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants