From 7a7e47eab7323a8e122d9994b2936e50e42a1af2 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Thu, 18 Mar 2021 21:53:19 +0100 Subject: Chalkify TraitRef --- crates/hir_ty/src/autoderef.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/hir_ty/src/autoderef.rs') 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}; use crate::{ db::HirDatabase, - to_assoc_type_id, + to_assoc_type_id, to_chalk_trait_id, traits::{InEnvironment, Solution}, utils::generics, BoundVar, Canonical, DebruijnIndex, Interner, Obligation, Substitution, TraitRef, Ty, TyKind, @@ -68,7 +68,8 @@ fn deref_by_trait( Substitution::build_for_generics(&generic_params).push(ty.value.value.clone()).build(); // Check that the type implements Deref at all - let trait_ref = TraitRef { trait_: deref_trait, substs: parameters.clone() }; + let trait_ref = + TraitRef { trait_id: to_chalk_trait_id(deref_trait), substitution: parameters.clone() }; let implements_goal = Canonical { kinds: ty.value.kinds.clone(), value: InEnvironment { -- cgit v1.2.3