diff options
author | Florian Diebold <[email protected]> | 2021-03-18 20:53:19 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-18 20:53:19 +0000 |
commit | 7a7e47eab7323a8e122d9994b2936e50e42a1af2 (patch) | |
tree | a2ad2b6faf8c708fc593546df64d489c117b61f2 /crates/hir_ty/src/autoderef.rs | |
parent | b70bea0d7994cbe7b1e01e6b2e0f4ab3ac2c6fd5 (diff) |
Chalkify TraitRef
Diffstat (limited to 'crates/hir_ty/src/autoderef.rs')
-rw-r--r-- | crates/hir_ty/src/autoderef.rs | 5 |
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 | ||
13 | use crate::{ | 13 | use 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 { |