summaryrefslogtreecommitdiffstats
path: root/tests/ui/non-copyable-void.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/non-copyable-void.rs')
-rw-r--r--tests/ui/non-copyable-void.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/non-copyable-void.rs b/tests/ui/non-copyable-void.rs
new file mode 100644
index 000000000..ddaaee436
--- /dev/null
+++ b/tests/ui/non-copyable-void.rs
@@ -0,0 +1,14 @@
+// ignore-wasm32-bare no libc to test ffi with
+
+#![feature(rustc_private)]
+
+extern crate libc;
+
+fn main() {
+ let x : *const Vec<isize> = &vec![1,2,3];
+ let y : *const libc::c_void = x as *const libc::c_void;
+ unsafe {
+ let _z = (*y).clone();
+ //~^ ERROR no method named `clone` found
+ }
+}