From 9b4ecd3723c0184706d1276759846ebf3fdff944 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Wed, 7 Apr 2021 20:41:52 +0200 Subject: Fix return type of `self_type_parameter` --- crates/hir_ty/src/traits/chalk/mapping.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir_ty/src/traits') 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( let (pred, binders) = pred.as_ref().into_value_and_skipped_binders(); match pred { WhereClause::Implemented(trait_ref) => { - if trait_ref.self_type_parameter(&Interner) != &self_ty_shifted_in { + if trait_ref.self_type_parameter(&Interner) != self_ty_shifted_in { // we can only convert predicates back to type bounds if they // have the expected self type return None; @@ -522,7 +522,7 @@ pub(super) fn generic_predicate_to_inline_bound( Some(chalk_ir::Binders::new(binders, rust_ir::InlineBound::TraitBound(trait_bound))) } WhereClause::AliasEq(AliasEq { alias: AliasTy::Projection(projection_ty), ty }) => { - if projection_ty.self_type_parameter(&Interner) != &self_ty_shifted_in { + if projection_ty.self_type_parameter(&Interner) != self_ty_shifted_in { return None; } let trait_ = projection_ty.trait_(db); -- cgit v1.2.3