diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-13 19:39:54 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-13 19:39:54 +0000 |
commit | d3ca2ab959af672e779757dbcab755b61a4ec091 (patch) | |
tree | 6c59a0786f78cc5878ddb74a589f1d221d907137 /crates/hir_ty/src/infer.rs | |
parent | 17eeb2a6d2ea81b302b6707c63bf8fba489c2bdd (diff) | |
parent | c82d1823a1624f4990b1ebaba5b6173f15631381 (diff) |
Merge #8002
8002: Create TraitEnvironment through a query r=flodiebold a=flodiebold
Co-authored-by: Florian Diebold <[email protected]>
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), |