summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-13 13:55:08 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-13 13:55:12 -0800
commit3cc2641fc389dcdf8b348c1a9dbc6dfe48c5547a (patch)
tree2a019c964f73f0b996fff16fd78cd744f2e5407b /src/test
parent768306baddc07ca8f43dd20c76f4647727a35cd7 (diff)
downloadrust-3cc2641fc389dcdf8b348c1a9dbc6dfe48c5547a.tar.gz
rust-3cc2641fc389dcdf8b348c1a9dbc6dfe48c5547a.zip
Make various binops not typecheck for unsafe pointers. Closes #1173
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/binop-add-ptr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/compile-fail/binop-add-ptr.rs b/src/test/compile-fail/binop-add-ptr.rs
new file mode 100644
index 00000000000..e21f6a97fc2
--- /dev/null
+++ b/src/test/compile-fail/binop-add-ptr.rs
@@ -0,0 +1,4 @@
+// error-pattern:binary operation + cannot be applied to type `*i`
+
+fn die() -> *int { (0 as *int) + (0 as *int) }
+fn main() { }
\ No newline at end of file