Skip to content

Commit 30d89af

Browse files
committed
Check for Copy impls for all types
1 parent 6840b5c commit 30d89af

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
#![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)]
159159
// Enable lints
160160
#![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
161+
#![deny(missing_copy_implementations)]
161162

162163
#[cfg(all(not(cross_platform_docs), feature = "use_std"))]
163164
extern crate std as core;

src/unix/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ pub type sighandler_t = ::size_t;
4242
pub type cc_t = ::c_uchar;
4343

4444
#[cfg_attr(feature = "extra_traits", derive(Debug))]
45+
#[derive(Clone, Copy)]
4546
pub enum DIR {}
4647
#[cfg_attr(feature = "extra_traits", derive(Debug))]
48+
#[derive(Clone, Copy)]
4749
pub enum locale_t {}
4850

4951
s! {
@@ -368,8 +370,10 @@ cfg_if! {
368370
}
369371

370372
#[cfg_attr(feature = "extra_traits", derive(Debug))]
373+
#[derive(Clone, Copy)]
371374
pub enum FILE {}
372375
#[cfg_attr(feature = "extra_traits", derive(Debug))]
376+
#[derive(Clone, Copy)]
373377
pub enum fpos_t {} // TODO: fill this out with a struct
374378

375379
extern {

src/unix/notbsd/linux/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub type Elf32_Section = u16;
3939
pub type Elf64_Section = u16;
4040

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

4445
s! {

src/unix/notbsd/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub type key_t = ::c_int;
99
pub type id_t = ::c_uint;
1010

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

1415
s! {

0 commit comments

Comments
 (0)