Skip to content

Commit

Permalink
Check for Copy impls for all types
Browse files Browse the repository at this point in the history
  • Loading branch information
Susurrus committed Jan 23, 2019
1 parent 31c0950 commit 207a40f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
#![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)]
// Enable lints
#![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
#![deny(missing_copy_implementations)]

#[cfg(all(not(cross_platform_docs), feature = "use_std"))]
extern crate std as core;
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub type nl_item = ::c_int;
pub type id_t = i64;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum timezone {}

s! {
Expand Down
4 changes: 4 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ pub type sighandler_t = ::size_t;
pub type cc_t = ::c_uchar;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum DIR {}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum locale_t {}

s! {
Expand Down Expand Up @@ -368,8 +370,10 @@ cfg_if! {
}

#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum FILE {}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum fpos_t {} // TODO: fill this out with a struct

extern {
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub type Elf32_Section = u16;
pub type Elf64_Section = u16;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum fpos64_t {} // TODO: fill this out with a struct

s! {
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub type key_t = ::c_int;
pub type id_t = ::c_uint;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum timezone {}

s! {
Expand Down
3 changes: 3 additions & 0 deletions src/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub type off_t = i32;
pub type dev_t = u32;
pub type ino_t = u16;
#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum timezone {}
pub type time64_t = i64;

Expand Down Expand Up @@ -203,8 +204,10 @@ pub const SIG_ERR: ::c_int = -1;
extern {}

#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum FILE {}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
#[derive(Clone, Copy)]
pub enum fpos_t {} // TODO: fill this out with a struct

extern {
Expand Down

0 comments on commit 207a40f

Please sign in to comment.