aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits/chalk/mapping.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-07 19:51:36 +0100
committerGitHub <[email protected]>2021-04-07 19:51:36 +0100
commit3191a93185b34c6deebca2aad0584d2840ad6d43 (patch)
tree1fad465381a5b9a9d0b77dbf68a246db1835f511 /crates/hir_ty/src/traits/chalk/mapping.rs
parent6379839c8203b6fbc9af947997a7f73a36ef15a2 (diff)
parentdc116f7ce2192433c9491441a11d294e7d294fbf (diff)
Merge #8409
8409: Various remaining fixes for Chalk IR move r=flodiebold a=flodiebold CC #8313 Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/traits/chalk/mapping.rs')
-rw-r--r--crates/hir_ty/src/traits/chalk/mapping.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs
index 84abd99b2..701359e6f 100644
--- a/crates/hir_ty/src/traits/chalk/mapping.rs
+++ b/crates/hir_ty/src/traits/chalk/mapping.rs
@@ -10,9 +10,9 @@ use base_db::salsa::InternKey;
10use hir_def::{GenericDefId, TypeAliasId}; 10use hir_def::{GenericDefId, TypeAliasId};
11 11
12use crate::{ 12use crate::{
13 chalk_ext::ProjectionTyExt, db::HirDatabase, static_lifetime, AliasTy, CallableDefId, 13 db::HirDatabase, static_lifetime, AliasTy, CallableDefId, Canonical, ConstrainedSubst,
14 Canonical, ConstrainedSubst, DomainGoal, FnPointer, GenericArg, InEnvironment, OpaqueTy, 14 DomainGoal, FnPointer, GenericArg, InEnvironment, OpaqueTy, ProjectionTy, ProjectionTyExt,
15 ProjectionTy, QuantifiedWhereClause, Substitution, TraitRef, Ty, TypeWalk, WhereClause, 15 QuantifiedWhereClause, Substitution, TraitRef, Ty, TypeWalk, WhereClause,
16}; 16};
17 17
18use super::interner::*; 18use super::interner::*;
@@ -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);