summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);
)
)