Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/lib.rs')
-rw-r--r--crates/hir-ty/src/lib.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs
index e6b8329ca8..5086be7330 100644
--- a/crates/hir-ty/src/lib.rs
+++ b/crates/hir-ty/src/lib.rs
@@ -62,7 +62,7 @@ use std::{hash::Hash, ops::ControlFlow};
use hir_def::{
CallableDefId, ExpressionStoreOwnerId, GenericDefId, TypeAliasId, TypeOrConstParamId,
- TypeParamId, hir::generics::GenericParams, resolver::TypeNs, type_ref::Rawness,
+ TypeParamId, resolver::TypeNs, type_ref::Rawness,
};
use hir_expand::name::Name;
use indexmap::{IndexMap, map::Entry};
@@ -495,10 +495,7 @@ pub fn associated_type_shorthand_candidates(
TypeNs::GenericParam(param) => (def, param),
TypeNs::SelfType(impl_) => {
let impl_trait = db.impl_trait(impl_)?.skip_binder().def_id.0;
- let param = TypeParamId::from_unchecked(TypeOrConstParamId {
- parent: impl_trait.into(),
- local_id: GenericParams::SELF_PARAM_ID_IN_SELF,
- });
+ let param = TypeParamId::trait_self(impl_trait);
(impl_trait.into(), param)
}
_ => return None,