about summary refs log tree commit diff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-10-06 21:33:04 -0700
committerBrian Anderson <banderson@mozilla.com>2011-10-12 14:26:47 -0700
commit046ca827dd02ca6e9b18264bfe5ffb8d30f77b47 (patch)
tree09e19a68135d2e4ff624d15df111de4a84ecf7e0 /src/comp/middle
parent29584cc5ac9369a18d1082d3d2c95eb0471a64db (diff)
Add unsafe blocks, unsafe functions, and two rudimentary tests
related to them
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/typeck.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 411a8ed213f..838b1f674fb 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -1552,10 +1552,12 @@ fn require_pure_call(ccx: @crate_ctxt, caller_purity: ast::purity,
             ccx.tcx.sess.span_fatal
                 (sp, "safe function calls function marked unsafe");
           }
-          //some(ast::def_native_fn(_)) {
-          //  ccx.tcx.sess.span_fatal
-          //  (sp, "native functions can only be invoked from unsafe code");
-          //}
+          /* Temporarily disable until unsafe blocks parse!
+          some(ast::def_native_fn(_)) {
+            ccx.tcx.sess.span_fatal
+                (sp, "native functions can only be invoked from unsafe code");
+          }
+          */
           _ {
           }
         }