diff options
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 4f7463422..bc52f447d 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -228,7 +228,9 @@ impl<'a> InferenceContext<'a> { | |||
228 | table: unify::InferenceTable::new(), | 228 | table: unify::InferenceTable::new(), |
229 | obligations: Vec::default(), | 229 | obligations: Vec::default(), |
230 | return_ty: TyKind::Unknown.intern(&Interner), // set in collect_fn_signature | 230 | return_ty: TyKind::Unknown.intern(&Interner), // set in collect_fn_signature |
231 | trait_env: TraitEnvironment::lower(db, &resolver), | 231 | trait_env: owner |
232 | .as_generic_def_id() | ||
233 | .map_or_else(Default::default, |d| db.trait_environment(d)), | ||
232 | db, | 234 | db, |
233 | owner, | 235 | owner, |
234 | body: db.body(owner), | 236 | body: db.body(owner), |