From ac8fee006a4858230fe22dfdb5647a3d0e19bb64 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 3 Apr 2021 22:45:31 +0200 Subject: Use TyBuilder in another place --- crates/hir_ty/src/lower.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 762b226e6..644a2eed5 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -860,10 +860,9 @@ pub fn associated_type_shorthand_candidates( if generics.params.types[param_id.local_id].provenance == TypeParamProvenance::TraitSelf { - let trait_ref = TraitRef { - trait_id: to_chalk_trait_id(trait_id), - substitution: Substitution::bound_vars(&generics, DebruijnIndex::INNERMOST), - }; + let trait_ref = TyBuilder::trait_ref(db, trait_id) + .fill_with_bound_vars(DebruijnIndex::INNERMOST, 0) + .build(); return search(trait_ref); } } -- cgit v1.2.3