]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/const-cast.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / test / run-pass / const-cast.rs
index 411df2b3e0759d7a8c59234d2e02e8c07f483c3c..e77fd5f71394ea0fad1bb9d31912cc7fcfabb7e9 100644 (file)
@@ -8,21 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-#![feature(libc)]
-
-extern crate libc;
-
 struct TestStruct {
-    x: *const libc::c_void
+    x: *const u8,
 }
 
 unsafe impl Sync for TestStruct {}
 
 extern fn foo() {}
 const x: extern "C" fn() = foo;
-static y: TestStruct = TestStruct { x: x as *const libc::c_void };
+static y: TestStruct = TestStruct { x: x as *const u8 };
 
 pub fn main() {
-    assert_eq!(x as *const libc::c_void, y.x);
+    assert_eq!(x as *const u8, y.x);
 }