Skip to content

Commit 433d102

Browse files
Minor simplification
1 parent 8b96128 commit 433d102

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

crates/hir-ty/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use std::{hash::Hash, ops::ControlFlow};
6262

6363
use hir_def::{
6464
CallableDefId, ExpressionStoreOwnerId, GenericDefId, TypeAliasId, TypeOrConstParamId,
65-
TypeParamId, hir::generics::GenericParams, resolver::TypeNs, type_ref::Rawness,
65+
TypeParamId, resolver::TypeNs, type_ref::Rawness,
6666
};
6767
use hir_expand::name::Name;
6868
use indexmap::{IndexMap, map::Entry};
@@ -495,10 +495,7 @@ pub fn associated_type_shorthand_candidates(
495495
TypeNs::GenericParam(param) => (def, param),
496496
TypeNs::SelfType(impl_) => {
497497
let impl_trait = db.impl_trait(impl_)?.skip_binder().def_id.0;
498-
let param = TypeParamId::from_unchecked(TypeOrConstParamId {
499-
parent: impl_trait.into(),
500-
local_id: GenericParams::SELF_PARAM_ID_IN_SELF,
501-
});
498+
let param = TypeParamId::trait_self(impl_trait);
502499
(impl_trait.into(), param)
503500
}
504501
_ => return None,

0 commit comments

Comments
 (0)