summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-03 17:17:23 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-03 17:17:23 +0800
commitb8791fa5dab37a033c6578c60b3918d66cbbd295 (patch)
treeb245604dda72816946cc84bea7942c1798003feb
parent487ef8ce6ba7a1e043fec039062b8099e5708060 (diff)
downloadmrust-b8791fa5dab37a033c6578c60b3918d66cbbd295.tar.gz
HIR Typecheck Expr - Casts of function pointers are valid to any pointer to unit
-rw-r--r--src/hir_typeck/expr_cs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 194834a8..729571d3 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -1526,7 +1526,7 @@ namespace {
ERROR(sp, E0000, "Invalid cast to pointer from " << src_ty);
),
(Function,
- if( e.type == ::HIR::BorrowType::Shared && *e.inner == ::HIR::TypeRef::new_unit() ) {
+ if( *e.inner == ::HIR::TypeRef::new_unit() ) {
this->m_completed = true;
}
else {