rust-lang/rust-analyzer

ice: salsa runtime

matthiaskrgr opened this issue · 0 comments

trait Traitor<'a, const M: Traitor = Traitor> {
    fn crash<const Traitor: Traitor = Traitor, const M: Traitor = Traitor>(&self) -> Traitor {
        Traitor
    }
}

rust-analyzer highlight < file.rs

thread 'main' panicked at /rust/deps/rust-analyzer-salsa-0.17.0-pre.4/src/runtime.rs:375:13:
Box<dyn Any>
stack backtrace:
   0: std::panicking::begin_panic::<salsa::Cycle>
   1: <salsa::runtime::Runtime>::unblock_cycle_and_maybe_throw
   2: <salsa::derived::slot::Slot<hir_ty::db::ConstParamTyQuery, salsa::derived::AlwaysMemoizeValue>>::probe::<lock_api::rwlock::RwLockReadGuard<parking_lot::raw_rwlock::RawRwLock, salsa::derived::slot::QueryState<hir_ty::db::ConstParamTyQuery>>>
   3: <_ as hir_ty::db::HirDatabase>::const_param_ty::__shim
   4: <core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::chain::Chain<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<hir_def::generics::TypeOrConstParamData>>, <la_arena::Arena<hir_def::generics::TypeOrConstParamData>>::iter::{closure#0}>, <hir_ty::utils::Generics>::iter::{closure#0}::{closure#0}>, core::iter::adapters::flatten::FlatMap<core::option::IntoIter<&hir_ty::utils::Generics>, core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<hir_def::generics::TypeOrConstParamData>>, <la_arena::Arena<hir_def::generics::TypeOrConstParamData>>::iter::{closure#0}>, <hir_ty::utils::Generics>::iter_parent::{closure#0}::{closure#0}>, <hir_ty::utils::Generics>::iter_parent::{closure#0}>>, <hir_ty::utils::Generics>::iter_id::{closure#0}>, <hir_ty::lower::TyLoweringContext>::substs_from_args_and_bindings::{closure#4}> as core::iter::traits::iterator::Iterator>::next
   5: <hir_ty::lower::TyLoweringContext>::substs_from_args_and_bindings
   6: <hir_ty::lower::TyLoweringContext>::lower_trait_ref_from_path
   7: <hir_ty::lower::TyLoweringContext>::lower_type_bound
   8: <hir_ty::lower::TyLoweringContext>::lower_dyn_trait
   9: <hir_ty::lower::TyLoweringContext>::lower_ty_ext
  10: <hir_ty::db::ConstParamTyQuery as salsa::plumbing::QueryFunction>::execute
  11: <salsa::derived::slot::Slot<hir_ty::db::ConstParamTyQuery, salsa::derived::AlwaysMemoizeValue>>::execute
  12: <_ as hir_ty::db::HirDatabase>::const_param_ty::__shim
  13: <core::iter::adapters::GenericShunt<chalk_ir::cast::Casted<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::chain::Chain<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<hir_def::generics::TypeOrConstParamData>>, <la_arena::Arena<hir_def::generics::TypeOrConstParamData>>::iter::{closure#0}>, <hir_ty::utils::Generics>::iter::{closure#0}::{closure#0}>, core::iter::adapters::flatten::FlatMap<core::option::IntoIter<&hir_ty::utils::Generics>, core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<hir_def::generics::TypeOrConstParamData>>, <la_arena::Arena<hir_def::generics::TypeOrConstParamData>>::iter::{closure#0}>, <hir_ty::utils::Generics>::iter_parent::{closure#0}::{closure#0}>, <hir_ty::utils::Generics>::iter_parent::{closure#0}>>, <hir_ty::utils::Generics>::iter_id::{closure#0}>, <hir_ty::utils::Generics>::placeholder_subst::{closure#0}>, <chalk_ir::Substitution<hir_ty::interner::Interner>>::from_iter<chalk_ir::GenericArg<hir_ty::interner::Interner>, core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::chain::Chain<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<hir_def::generics::TypeOrConstParamData>>, <la_arena::Arena<hir_def::generics::TypeOrConstParamData>>::iter::{closure#0}>, <hir_ty::utils::Generics>::iter::{closure#0}::{closure#0}>, core::iter::adapters::flatten::FlatMap<core::option::IntoIter<&hir_ty::utils::Generics>, core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<hir_def::generics::TypeOrConstParamData>>, <la_arena::Arena<hir_def::generics::TypeOrConstParamData>>::iter::{closure#0}>, <hir_ty::utils::Generics>::iter_parent::{closure#0}::{closure#0}>, <hir_ty::utils::Generics>::iter_parent::{closure#0}>>, <hir_ty::utils::Generics>::iter_id::{closure#0}>, <hir_ty::utils::Generics>::placeholder_subst::{closure#0}>>::{closure#0}>, core::result::Result<chalk_ir::GenericArg<hir_ty::interner::Interner>, ()>>, core::result::Result<core::convert::Infallible, ()>> as core::iter::traits::iterator::Iterator>::next
  14: <hir_ty::utils::Generics>::placeholder_subst
  15: <hir_ty::db::TraitEnvironmentQuery as salsa::plumbing::QueryFunction>::execute
  16: <salsa::derived::slot::Slot<hir_ty::db::TraitEnvironmentQuery, salsa::derived::AlwaysMemoizeValue>>::execute
  17: <_ as hir_ty::db::HirDatabase>::trait_environment::__shim
  18: hir_ty::lower::trait_environment_for_body_query
  19: hir_ty::infer::infer_query
  20: <salsa::derived::slot::Slot<hir_ty::db::InferQueryQuery, salsa::derived::AlwaysMemoizeValue>>::execute
  21: <_ as hir_ty::db::HirDatabase>::infer_query::__shim
  22: hir_ty::db::infer_wait
  23: <hir::semantics::SemanticsImpl>::analyze_impl
  24: <hir::semantics::SemanticsImpl>::resolve_path
  25: <ide_db::defs::NameRefClass>::classify
  26: ide::syntax_highlighting::highlight
  27: <ide::Analysis>::highlight_as_html
  28: <rust_analyzer::cli::flags::Highlight>::run
  29: rust_analyzer::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

rust-analyzer 1.77.0-nightly (595bc6f 2024-01-05)