aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer/path.rs')
-rw-r--r--crates/hir_ty/src/infer/path.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/hir_ty/src/infer/path.rs b/crates/hir_ty/src/infer/path.rs
index e15135fc1..58cce56ab 100644
--- a/crates/hir_ty/src/infer/path.rs
+++ b/crates/hir_ty/src/infer/path.rs
@@ -2,6 +2,7 @@
2 2
3use std::iter; 3use std::iter;
4 4
5use chalk_ir::cast::Cast;
5use hir_def::{ 6use hir_def::{
6 path::{Path, PathSegment}, 7 path::{Path, PathSegment},
7 resolver::{ResolveValueResult, Resolver, TypeNs, ValueNs}, 8 resolver::{ResolveValueResult, Resolver, TypeNs, ValueNs},
@@ -256,10 +257,13 @@ impl<'a> InferenceContext<'a> {
256 .push(ty.clone()) 257 .push(ty.clone())
257 .fill(std::iter::repeat_with(|| self.table.new_type_var())) 258 .fill(std::iter::repeat_with(|| self.table.new_type_var()))
258 .build(); 259 .build();
259 self.obligations.push(super::Obligation::Trait(TraitRef { 260 self.obligations.push(
260 trait_id: to_chalk_trait_id(trait_), 261 TraitRef {
261 substitution: trait_substs.clone(), 262 trait_id: to_chalk_trait_id(trait_),
262 })); 263 substitution: trait_substs.clone(),
264 }
265 .cast(&Interner),
266 );
263 Some(trait_substs) 267 Some(trait_substs)
264 } 268 }
265 AssocContainerId::ModuleId(_) => None, 269 AssocContainerId::ModuleId(_) => None,