mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Use TyBuilder in another place
This commit is contained in:
parent
eaa03ef446
commit
ac8fee006a
1 changed files with 3 additions and 4 deletions
|
@ -860,10 +860,9 @@ pub fn associated_type_shorthand_candidates<R>(
|
||||||
if generics.params.types[param_id.local_id].provenance
|
if generics.params.types[param_id.local_id].provenance
|
||||||
== TypeParamProvenance::TraitSelf
|
== TypeParamProvenance::TraitSelf
|
||||||
{
|
{
|
||||||
let trait_ref = TraitRef {
|
let trait_ref = TyBuilder::trait_ref(db, trait_id)
|
||||||
trait_id: to_chalk_trait_id(trait_id),
|
.fill_with_bound_vars(DebruijnIndex::INNERMOST, 0)
|
||||||
substitution: Substitution::bound_vars(&generics, DebruijnIndex::INNERMOST),
|
.build();
|
||||||
};
|
|
||||||
return search(trait_ref);
|
return search(trait_ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue