summaryrefslogtreecommitdiff
path: root/src/unix/mod.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2019-01-23 07:23:09 -0800
committerBryant Mairs <bryant@mai.rs>2019-02-02 16:32:00 -0800
commitf3684584c99b8048cbfb056346dba34328e3a4f9 (patch)
tree953c2303d7708deffa76bc3daaab254f8eb99ec4 /src/unix/mod.rs
parentfa9cb78b4a04e6cbb12c3edc3efb9486d0f13b37 (diff)
downloadrust-libc-f3684584c99b8048cbfb056346dba34328e3a4f9.tar.gz
Check for Copy impls for all types
Diffstat (limited to 'src/unix/mod.rs')
-rw-r--r--src/unix/mod.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index bcd16f83ef..409f2835fd 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -43,8 +43,16 @@ pub type cc_t = ::c_uchar;
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum DIR {}
+impl ::dox::Copy for DIR {}
+impl ::dox::Clone for DIR {
+ fn clone(&self) -> DIR { *self }
+}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum locale_t {}
+impl ::dox::Copy for locale_t {}
+impl ::dox::Clone for locale_t {
+ fn clone(&self) -> locale_t { *self }
+}
s! {
pub struct group {
@@ -369,8 +377,16 @@ cfg_if! {
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum FILE {}
+impl ::dox::Copy for FILE {}
+impl ::dox::Clone for FILE {
+ fn clone(&self) -> FILE { *self }
+}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos_t {} // TODO: fill this out with a struct
+impl ::dox::Copy for fpos_t {}
+impl ::dox::Clone for fpos_t {
+ fn clone(&self) -> fpos_t { *self }
+}
extern {
pub fn isalnum(c: c_int) -> c_int;
@@ -1160,6 +1176,7 @@ cfg_if! {
// enable more optimization opportunities around it recognizing things
// like malloc/free.
#[repr(u8)]
+ #[allow(missing_copy_implementations)]
pub enum c_void {
// Two dummy variants so the #[repr] attribute can be used.
#[doc(hidden)]