Closed
Description
When putting the cursor on the Output
ident in the trait impl it triggers the assertion
trait Trait {
type Output;
}
impl Trait for () {
type Output = ();
}
thread 'Worker' panicked at 'assertion failed: generics.parent_generics().is_some() == parent_subst.is_some()', crates\hir-ty\src\builder.rs:195:9
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\std\src\panicking.rs:584
1: core::panicking::panic_fmt
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\core\src\panicking.rs:142
2: core::panicking::panic
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\core\src\panicking.rs:48
3: hir_ty::builder::TyBuilder<()>::subst_for_def
4: hir_ty::builder::TyBuilder<chalk_ir::Binders<chalk_ir::Ty<hir_ty::interner::Interner>>>::def_ty
5: hir::TypeAlias::ty
6: ide_db::search::def_to_ty
7: ide_db::search::FindUsages::include_self_refs
8: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
9: <hashbrown::map::HashMap<K,V,S,A> as core::iter::traits::collect::Extend<(K,V)>>::extend
10: ide::highlight_related::highlight_related
11: std::panicking::try
12: rust_analyzer::handlers::handle_document_highlight
13: std::panicking::try
14: <F as threadpool::FnBox>::call_box
This is missing the trait impl case I assume?
rust-analyzer/crates/hir/src/lib.rs
Lines 2804 to 2813 in 476d043