diff options
Diffstat (limited to 'crates/hir_ty/src/traits/chalk')
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 59aaa5560..67e88ebf4 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs | |||
@@ -539,7 +539,7 @@ pub(super) fn generic_predicate_to_inline_bound( | |||
539 | let self_ty_shifted_in = self_ty.clone().shift_bound_vars(DebruijnIndex::ONE); | 539 | let self_ty_shifted_in = self_ty.clone().shift_bound_vars(DebruijnIndex::ONE); |
540 | match &pred.value { | 540 | match &pred.value { |
541 | WhereClause::Implemented(trait_ref) => { | 541 | WhereClause::Implemented(trait_ref) => { |
542 | if trait_ref.self_type_parameter() != &self_ty_shifted_in { | 542 | if trait_ref.self_type_parameter(&Interner) != &self_ty_shifted_in { |
543 | // we can only convert predicates back to type bounds if they | 543 | // we can only convert predicates back to type bounds if they |
544 | // have the expected self type | 544 | // have the expected self type |
545 | return None; | 545 | return None; |
@@ -552,7 +552,7 @@ pub(super) fn generic_predicate_to_inline_bound( | |||
552 | Some(make_binders(rust_ir::InlineBound::TraitBound(trait_bound), pred.num_binders)) | 552 | Some(make_binders(rust_ir::InlineBound::TraitBound(trait_bound), pred.num_binders)) |
553 | } | 553 | } |
554 | WhereClause::AliasEq(AliasEq { alias: AliasTy::Projection(projection_ty), ty }) => { | 554 | WhereClause::AliasEq(AliasEq { alias: AliasTy::Projection(projection_ty), ty }) => { |
555 | if projection_ty.self_type_parameter() != &self_ty_shifted_in { | 555 | if projection_ty.self_type_parameter(&Interner) != &self_ty_shifted_in { |
556 | return None; | 556 | return None; |
557 | } | 557 | } |
558 | let trait_ = projection_ty.trait_(db); | 558 | let trait_ = projection_ty.trait_(db); |