Skip to content
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

failed to lift QueryResult #2580

Closed
oli-obk opened this issue Mar 27, 2018 · 2 comments · Fixed by #2582
Closed

failed to lift QueryResult #2580

oli-obk opened this issue Mar 27, 2018 · 2 comments · Fixed by #2582

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Mar 27, 2018

$ rustc --version                    
rustc 1.26.0-nightly (a04b88d19 2018-03-19)
$ cargo --version                    
cargo 1.26.0-nightly (d6c3983fe 2018-03-16)
$ cargo clippy --version             
0.0.189

~/rmp-rpc ❯❯❯ cargo clippy                                                                                                                                                             master
lib: rmp-rpc
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling rmp-rpc v0.2.0 (file:///home/corentih/rmp-rpc)                     
error: internal compiler error: librustc/infer/canonical.rs:703: failed to lift `QueryResult { var_values: CanonicalVarValues { var_values: [] }, region_constraints: QueryRegionConstraints { region_outlives: [(ReErased, '?0), ('?0, ReErased)], ty_outlives: [] }, certainty: Proven, value: NormalizationResult { normalized_ty: std::collections::hash_map::RandomState } }`, canonicalized from `QueryResult { var_values: CanonicalVarValues { var_values: [] }, region_constraints: QueryRegionConstraints { region_outlives: [(ReErased, '_#0r), ('_#0r, ReErased)], ty_outlives: [] }, certainty: Proven, value: NormalizationResult { normalized_ty: std::collections::hash_map::RandomState } }`

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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.26.0-nightly (a04b88d19 2018-03-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `rmp-rpc`.

To learn more, run the command again with --verbose.

original issue: rust-lang/rust#49114 (comment)

@lorepozo
Copy link

lorepozo commented Mar 27, 2018

For you that was happening with std::collections::hash_map::RandomState, I'm also seeing it with rayon_core::registry::WorkerThread:

$ cargo clippy --version
0.0.190
$ rustc --version
rustc 1.26.0-nightly (188e693b3 2018-03-26)
$ cargo clippy
error: internal compiler error: librustc/infer/canonical.rs:707: failed to lift `QueryResult { var_values: CanonicalVarValues { var_values: [] }, region_constraints: QueryRegionConstraints { region_outlives: [(ReErased, '?0), ('?0, ReErased)], ty_outlives: [] }, certainty: Proven, value: NormalizationResult { normalized_ty: *const rayon_core::registry::WorkerThread } }`, canonicalized from `QueryResult { var_values: CanonicalVarValues { var_values: [] }, region_constraints: QueryRegionConstraints { region_outlives: [(ReErased, '_#0r), ('_#0r, ReErased)], ty_outlives: [] }, certainty: Proven, value: NormalizationResult { normalized_ty: *const rayon_core::registry::WorkerThread } }`

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: core::ops::function::Fn::call
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::session::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: <std::thread::local::LocalKey<T>>::try_with
  11: <std::thread::local::LocalKey<T>>::with
  12: rustc::ty::context::tls::with
  13: rustc::ty::context::tls::with_opt
  14: rustc::session::opt_span_bug_fmt
  15: rustc::session::bug_fmt
  16: rustc::infer::canonical::Canonicalizer::canonicalize
  17: rustc_traits::util::make_query_response
  18: rustc::ty::context::tls::enter
  19: rustc::infer::InferCtxtBuilder::enter
  20: rustc_traits::normalize_projection_ty::normalize_projection_ty
  21: rustc::dep_graph::graph::DepGraph::with_ignore
  22: rustc_errors::Handler::track_diagnostics
  23: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  24: rustc::ty::maps::<impl rustc::ty::maps::queries::normalize_projection_ty<'tcx>>::try_get
  25: rustc::ty::maps::TyCtxtAt::normalize_projection_ty
  26: <rustc::traits::query::normalize::QueryNormalizer<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  27: rustc::traits::query::normalize::<impl rustc::infer::at::At<'cx, 'gcx, 'tcx>>::normalize
  28: rustc::ty::context::tls::enter
  29: rustc_traits::normalize_erasing_regions::normalize_ty_after_erasing_regions
  30: rustc::dep_graph::graph::DepGraph::with_ignore
  31: rustc_errors::Handler::track_diagnostics
  32: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  33: rustc::ty::maps::<impl rustc::ty::maps::queries::normalize_ty_after_erasing_regions<'tcx>>::try_get
  34: rustc::ty::maps::TyCtxtAt::normalize_ty_after_erasing_regions
  35: <rustc::traits::query::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder<'cx, 'tcx> as rustc::ty::fold::TypeFolder<'tcx, 'tcx>>::fold_ty
  36: <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter
  37: rustc::ty::fold::TypeFoldable::fold_with
  38: rustc::traits::query::normalize_erasing_regions::<impl rustc::ty::context::TyCtxt<'cx, 'tcx, 'tcx>>::normalize_erasing_late_bound_regions
  39: rustc_trans::mir::block::<impl rustc_trans::mir::FunctionCx<'a, 'tcx>>::trans_terminator
  40: rustc_trans::mir::trans_mir
  41: rustc_trans::base::trans_instance
  42: rustc_trans::trans_item::MonoItemExt::define
  43: rustc_trans::base::compile_codegen_unit
  44: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::compute_result
  45: rustc::dep_graph::graph::DepGraph::with_task_impl
  46: rustc_errors::Handler::track_diagnostics
  47: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  48: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::force
  49: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::try_get
  50: rustc::ty::maps::TyCtxtAt::compile_codegen_unit
  51: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::compile_codegen_unit
  52: rustc_trans::base::trans_crate
  53: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  54: rustc::util::common::time
  55: rustc_driver::driver::phase_4_translate_to_llvm
  56: rustc_driver::driver::compile_input::{{closure}}
  57: <std::thread::local::LocalKey<T>>::with
  58: <std::thread::local::LocalKey<T>>::with
  59: rustc::ty::context::TyCtxt::create_and_enter
  60: rustc_driver::driver::compile_input
  61: rustc_driver::run_compiler_impl
  62: syntax::with_globals
  63: rustc_driver::run_compiler
error: aborting due to previous error


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.26.0-nightly (188e693b3 2018-03-26) running on x86_64-apple-darwin

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

edit: also worth note, removing the following line from my code prevents this (but gives me warnings that I want to allow):

#![cfg_attr(feature = "cargo-clippy", allow(doc_markdown))]

@little-dude
Copy link

Let me know if you need any more info @oli-obk

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

Successfully merging a pull request may close this issue.

3 participants