diff options
Diffstat (limited to 'src/test/ui/foreign/foreign-mod-src/inner.rs')
-rw-r--r-- | src/test/ui/foreign/foreign-mod-src/inner.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/foreign/foreign-mod-src/inner.rs b/src/test/ui/foreign/foreign-mod-src/inner.rs new file mode 100644 index 000000000..cf484878b --- /dev/null +++ b/src/test/ui/foreign/foreign-mod-src/inner.rs @@ -0,0 +1,14 @@ +// run-pass + + + +pub fn main() { + let f = "Makefile"; + let s = rustrt.str_buf(f); + let buf = libc.malloc(1024); + let fd = libc.open(s, 0, 0); + libc.read(fd, buf, 1024); + libc.write(1, buf, 1024); + libc.close(fd); + libc.free(buf); +} |