summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-07-07 05:04:36 +1000
committerJohn Hodge <tpg@mutabah.net>2016-07-07 05:04:36 +1000
commitdc7371626369717e3347887a21b69ccb2c338af5 (patch)
treea9cf8abbefba55f895bf532b081c1354a6de5530 /src
parentae5df84479553a3bb0dff7c0ebc85eb4305bd298 (diff)
downloadmrust-dc7371626369717e3347887a21b69ccb2c338af5.tar.gz
HIR Typecheck CS - Closures don't coerce yet
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/expr_cs.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 79a4e8e6..47b2a214 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -2327,7 +2327,11 @@ namespace {
TODO(sp, "check_coerce - Coercion from " << ty_r);
),
(Closure,
- TODO(sp, "check_coerce - Coercion from " << ty_r);
+ // TODO: Can closures coerce to anything?
+ // - (eventually maybe fn() if they don't capture, but that's not rustc yet)
+ context.equate_types(sp, ty, node_ptr->m_res_type);
+ return true;
+ //TODO(sp, "check_coerce - Coercion from " << ty_r << " to " << ty);
)
)