summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-10-29 14:27:13 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-10-29 14:27:13 +0800
commitbbe5262a00b41053355286e9a42551c06614da2b (patch)
tree943164d3a628f7e579b32589edf68735ee8f4876 /src/mir/from_hir.cpp
parente0ce444a815bde4221469388a63dc02b9929a33a (diff)
downloadmrust-bbe5262a00b41053355286e9a42551c06614da2b.tar.gz
HIR Typecheck - Allow casting function pointers to *const i8
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r--src/mir/from_hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 8ea22cef..2a02b166 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -1247,7 +1247,7 @@ namespace {
// Valid
)
else TU_IFLET( ::HIR::TypeRef::Data, ty_in.m_data, Function, se,
- if( *de.inner != ::HIR::TypeRef::new_unit() && *de.inner != ::HIR::CoreType::U8 ) {
+ if( *de.inner != ::HIR::TypeRef::new_unit() && *de.inner != ::HIR::CoreType::U8 && *de.inner != ::HIR::CoreType::I8 ) {
BUG(node.span(), "Cannot cast to " << ty_out << " from " << ty_in);
}
// Valid