diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-11-13 13:55:08 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-11-13 13:55:12 -0800 |
| commit | 3cc2641fc389dcdf8b348c1a9dbc6dfe48c5547a (patch) | |
| tree | 2a019c964f73f0b996fff16fd78cd744f2e5407b /src/test | |
| parent | 768306baddc07ca8f43dd20c76f4647727a35cd7 (diff) | |
| download | rust-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.rs | 4 |
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 |
