diff options
author | Aleksey Kladov <[email protected]> | 2019-11-25 15:31:48 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-25 15:31:48 +0000 |
commit | 3e32ac4f866e2b9430dd1e91b2c7fa3824c646a9 (patch) | |
tree | 67c6c2d2ddc939da2bb3e3e6f0e5b87b53215da0 /crates/ra_hir/src/ty/infer | |
parent | ecd1204804a2a3c8b9b98e4b9d18feef06ab51c7 (diff) |
More ids in Ty
Diffstat (limited to 'crates/ra_hir/src/ty/infer')
-rw-r--r-- | crates/ra_hir/src/ty/infer/expr.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs index 994a6d7e9..b581d192f 100644 --- a/crates/ra_hir/src/ty/infer/expr.rs +++ b/crates/ra_hir/src/ty/infer/expr.rs | |||
@@ -137,8 +137,10 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
137 | TypeCtor::FnPtr { num_args: sig_tys.len() as u16 - 1 }, | 137 | TypeCtor::FnPtr { num_args: sig_tys.len() as u16 - 1 }, |
138 | Substs(sig_tys.into()), | 138 | Substs(sig_tys.into()), |
139 | ); | 139 | ); |
140 | let closure_ty = | 140 | let closure_ty = Ty::apply_one( |
141 | Ty::apply_one(TypeCtor::Closure { def: self.owner, expr: tgt_expr }, sig_ty); | 141 | TypeCtor::Closure { def: self.owner.into(), expr: tgt_expr }, |
142 | sig_ty, | ||
143 | ); | ||
142 | 144 | ||
143 | // Eagerly try to relate the closure type with the expected | 145 | // Eagerly try to relate the closure type with the expected |
144 | // type, otherwise we often won't have enough information to | 146 | // type, otherwise we often won't have enough information to |