aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-07 19:41:52 +0100
committerFlorian Diebold <[email protected]>2021-04-07 19:41:52 +0100
commit9b4ecd3723c0184706d1276759846ebf3fdff944 (patch)
treee32e0458498407d8a914b468deabab667b7caeed /crates/hir_ty/src/traits
parent6777a4975d6a88928fda3e3b3f0bb05d98c61060 (diff)
Fix return type of `self_type_parameter`
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r--crates/hir_ty/src/traits/chalk/mapping.rs4
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 f64b5f4f8..701359e6f 100644
--- a/crates/hir_ty/src/traits/chalk/mapping.rs
+++ b/crates/hir_ty/src/traits/chalk/mapping.rs
@@ -509,7 +509,7 @@ pub(super) fn generic_predicate_to_inline_bound(
509 let (pred, binders) = pred.as_ref().into_value_and_skipped_binders(); 509 let (pred, binders) = pred.as_ref().into_value_and_skipped_binders();
510 match pred { 510 match pred {
511 WhereClause::Implemented(trait_ref) => { 511 WhereClause::Implemented(trait_ref) => {
512 if trait_ref.self_type_parameter(&Interner) != &self_ty_shifted_in { 512 if trait_ref.self_type_parameter(&Interner) != self_ty_shifted_in {
513 // we can only convert predicates back to type bounds if they 513 // we can only convert predicates back to type bounds if they
514 // have the expected self type 514 // have the expected self type
515 return None; 515 return None;
@@ -522,7 +522,7 @@ pub(super) fn generic_predicate_to_inline_bound(
522 Some(chalk_ir::Binders::new(binders, rust_ir::InlineBound::TraitBound(trait_bound))) 522 Some(chalk_ir::Binders::new(binders, rust_ir::InlineBound::TraitBound(trait_bound)))
523 } 523 }
524 WhereClause::AliasEq(AliasEq { alias: AliasTy::Projection(projection_ty), ty }) => { 524 WhereClause::AliasEq(AliasEq { alias: AliasTy::Projection(projection_ty), ty }) => {
525 if projection_ty.self_type_parameter(&Interner) != &self_ty_shifted_in { 525 if projection_ty.self_type_parameter(&Interner) != self_ty_shifted_in {
526 return None; 526 return None;
527 } 527 }
528 let trait_ = projection_ty.trait_(db); 528 let trait_ = projection_ty.trait_(db);