aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-20 17:18:52 +0000
committerGitHub <[email protected]>2019-12-20 17:18:52 +0000
commit99d6f544f2a590d3feef47ce62d5cd9a8b463a47 (patch)
treeae4e2dd0ae2c62baf79ec1197f5ec5f94a7645e5 /crates/ra_hir_ty/src/infer.rs
parentcfc50ff160d0af2ce5cd931c6d41161abfdb2fbd (diff)
parent2a8c9100bfb1294a469bc039a5b9597eabed7073 (diff)
Merge #2616
2616: Handle closure return types r=flodiebold a=flodiebold Fixes #2547. Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/infer.rs')
-rw-r--r--crates/ra_hir_ty/src/infer.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs
index bbbc391c4..9f2ed830e 100644
--- a/crates/ra_hir_ty/src/infer.rs
+++ b/crates/ra_hir_ty/src/infer.rs
@@ -196,7 +196,12 @@ struct InferenceContext<'a, D: HirDatabase> {
196 trait_env: Arc<TraitEnvironment>, 196 trait_env: Arc<TraitEnvironment>,
197 obligations: Vec<Obligation>, 197 obligations: Vec<Obligation>,
198 result: InferenceResult, 198 result: InferenceResult,
199 /// The return type of the function being inferred. 199 /// The return type of the function being inferred, or the closure if we're
200 /// currently within one.
201 ///
202 /// We might consider using a nested inference context for checking
203 /// closures, but currently this is the only field that will change there,
204 /// so it doesn't make sense.
200 return_ty: Ty, 205 return_ty: Ty,
201 206
202 /// Impls of `CoerceUnsized` used in coercion. 207 /// Impls of `CoerceUnsized` used in coercion.