aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/autoderef.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-18 20:54:24 +0000
committerGitHub <[email protected]>2021-03-18 20:54:24 +0000
commit5e82d3172282e159e539569b80b3135c17b972f0 (patch)
treea2ad2b6faf8c708fc593546df64d489c117b61f2 /crates/hir_ty/src/autoderef.rs
parentb70bea0d7994cbe7b1e01e6b2e0f4ab3ac2c6fd5 (diff)
parent7a7e47eab7323a8e122d9994b2936e50e42a1af2 (diff)
Merge #8096
8096: Chalkify TraitRef r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/autoderef.rs')
-rw-r--r--crates/hir_ty/src/autoderef.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir_ty/src/autoderef.rs b/crates/hir_ty/src/autoderef.rs
index bd2ff5d38..ad4e6f23b 100644
--- a/crates/hir_ty/src/autoderef.rs
+++ b/crates/hir_ty/src/autoderef.rs
@@ -12,7 +12,7 @@ use log::{info, warn};
12 12
13use crate::{ 13use crate::{
14 db::HirDatabase, 14 db::HirDatabase,
15 to_assoc_type_id, 15 to_assoc_type_id, to_chalk_trait_id,
16 traits::{InEnvironment, Solution}, 16 traits::{InEnvironment, Solution},
17 utils::generics, 17 utils::generics,
18 BoundVar, Canonical, DebruijnIndex, Interner, Obligation, Substitution, TraitRef, Ty, TyKind, 18 BoundVar, Canonical, DebruijnIndex, Interner, Obligation, Substitution, TraitRef, Ty, TyKind,
@@ -68,7 +68,8 @@ fn deref_by_trait(
68 Substitution::build_for_generics(&generic_params).push(ty.value.value.clone()).build(); 68 Substitution::build_for_generics(&generic_params).push(ty.value.value.clone()).build();
69 69
70 // Check that the type implements Deref at all 70 // Check that the type implements Deref at all
71 let trait_ref = TraitRef { trait_: deref_trait, substs: parameters.clone() }; 71 let trait_ref =
72 TraitRef { trait_id: to_chalk_trait_id(deref_trait), substitution: parameters.clone() };
72 let implements_goal = Canonical { 73 let implements_goal = Canonical {
73 kinds: ty.value.kinds.clone(), 74 kinds: ty.value.kinds.clone(),
74 value: InEnvironment { 75 value: InEnvironment {