Skip to content

Commit 0c7e786

Browse files
half work
1 parent 350d8a8 commit 0c7e786

File tree

5 files changed

+380
-171
lines changed

5 files changed

+380
-171
lines changed

crates/hir-ty/src/display.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@ impl HirDisplay for ProjectionTy {
684684
),
685685
&assoc_type
686686
.bounds
687-
.skip_binders()
687+
.clone()
688+
.substitute(Interner, &self.substitution)
688689
.iter()
689690
.map(|bound| {
690691
// We ignore `Self` anyway when formatting, so it's fine put an error type in it.

crates/hir-ty/src/lower.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use crate::{
5252
FnSubst, ImplTrait, ImplTraitId, ImplTraits, Interner, Lifetime, LifetimeData,
5353
LifetimeOutlives, PlaceholderIndex, PolyFnSig, ProgramClause, ProjectionTy,
5454
QuantifiedWhereClause, QuantifiedWhereClauses, Substitution, TraitEnvironment, TraitRef,
55-
TraitRefExt, Ty, TyBuilder, TyKind, VariableKind, VariableKinds, WhereClause, all_super_traits,
55+
TraitRefExt, Ty, TyBuilder, TyKind, VariableKinds, WhereClause, all_super_traits,
5656
chalk_db::generic_predicate_to_inline_bound,
5757
consteval::{intern_const_ref, path_to_const, unknown_const, unknown_const_as_generic},
5858
db::HirDatabase,
@@ -519,15 +519,7 @@ impl<'a> TyLoweringContext<'a> {
519519

520520
let assoc_type_binders = VariableKinds::from_iter(
521521
Interner,
522-
method_generics.iter_id().map(|param_id| match param_id {
523-
GenericParamId::TypeParamId(_) => {
524-
VariableKind::Ty(chalk_ir::TyVariableKind::General)
525-
}
526-
GenericParamId::ConstParamId(param_id) => {
527-
VariableKind::Const(self.db.const_param_ty(param_id))
528-
}
529-
GenericParamId::LifetimeParamId(_) => VariableKind::Lifetime,
530-
}),
522+
variable_kinds_from_generics(self.db, method_generics.iter_id()),
531523
);
532524

533525
let returned_subst = self.subst_for_generics();

0 commit comments

Comments
 (0)