File tree Expand file tree Collapse file tree 4 files changed +20
-36
lines changed Expand file tree Collapse file tree 4 files changed +20
-36
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,12 @@ macro_rules! s_no_extra_traits {
120
120
) ;
121
121
}
122
122
123
+ macro_rules! missing {
124
+ ( $( $( #[ $attr: meta] ) * pub enum $i: ident { } ) * ) => ( $(
125
+ $( #[ $attr] ) * #[ allow( missing_copy_implementations) ] pub enum $i { }
126
+ ) * ) ;
127
+ }
128
+
123
129
macro_rules! e {
124
130
( $( $( #[ $attr: meta] ) * pub enum $i: ident { $( $field: tt) * } ) * ) => ( $(
125
131
__item! {
Original file line number Diff line number Diff line change @@ -53,13 +53,9 @@ pub type iconv_t = *mut ::c_void;
53
53
pub type sctp_assoc_t = :: __s32 ;
54
54
55
55
pub type eventfd_t = u64 ;
56
- #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
57
- pub enum fpos64_t { } // FIXME: fill this out with a struct
58
- impl :: Copy for fpos64_t { }
59
- impl :: Clone for fpos64_t {
60
- fn clone ( & self ) -> fpos64_t {
61
- * self
62
- }
56
+ missing ! {
57
+ #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
58
+ pub enum fpos64_t { } // FIXME: fill this out with a struct
63
59
}
64
60
65
61
s ! {
Original file line number Diff line number Diff line change @@ -6,13 +6,9 @@ pub type timer_t = *mut ::c_void;
6
6
pub type key_t = :: c_int ;
7
7
pub type id_t = :: c_uint ;
8
8
9
- #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
10
- pub enum timezone { }
11
- impl :: Copy for timezone { }
12
- impl :: Clone for timezone {
13
- fn clone ( & self ) -> timezone {
14
- * self
15
- }
9
+ missing ! {
10
+ #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
11
+ pub enum timezone { }
16
12
}
17
13
18
14
s ! {
Original file line number Diff line number Diff line change @@ -41,13 +41,9 @@ cfg_if! {
41
41
}
42
42
}
43
43
44
- #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
45
- pub enum DIR { }
46
- impl :: Copy for DIR { }
47
- impl :: Clone for DIR {
48
- fn clone ( & self ) -> DIR {
49
- * self
50
- }
44
+ missing ! {
45
+ #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
46
+ pub enum DIR { }
51
47
}
52
48
pub type locale_t = * mut :: c_void ;
53
49
@@ -414,21 +410,11 @@ cfg_if! {
414
410
}
415
411
}
416
412
417
- #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
418
- pub enum FILE { }
419
- impl :: Copy for FILE { }
420
- impl :: Clone for FILE {
421
- fn clone ( & self ) -> FILE {
422
- * self
423
- }
424
- }
425
- #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
426
- pub enum fpos_t { } // FIXME: fill this out with a struct
427
- impl :: Copy for fpos_t { }
428
- impl :: Clone for fpos_t {
429
- fn clone ( & self ) -> fpos_t {
430
- * self
431
- }
413
+ missing ! {
414
+ #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
415
+ pub enum FILE { }
416
+ #[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
417
+ pub enum fpos_t { } // FIXME: fill this out with a struct
432
418
}
433
419
434
420
extern "C" {
You can’t perform that action at this time.
0 commit comments