Skip to content

Commit 6840b5c

Browse files
committed
Check for Debug impls for all types
1 parent fbd9250 commit 6840b5c

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@
156156
#![cfg_attr(feature = "rustc-dep-of-std", no_core)]
157157
#![cfg_attr(feature = "rustc-dep-of-std", allow(warnings))]
158158
#![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)]
159+
// Enable lints
160+
#![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
159161

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

src/unix/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ pub type in_port_t = u16;
4141
pub type sighandler_t = ::size_t;
4242
pub type cc_t = ::c_uchar;
4343

44+
#[cfg_attr(feature = "extra_traits", derive(Debug))]
4445
pub enum DIR {}
46+
#[cfg_attr(feature = "extra_traits", derive(Debug))]
4547
pub enum locale_t {}
4648

4749
s! {
@@ -365,7 +367,9 @@ cfg_if! {
365367
}
366368
}
367369

370+
#[cfg_attr(feature = "extra_traits", derive(Debug))]
368371
pub enum FILE {}
372+
#[cfg_attr(feature = "extra_traits", derive(Debug))]
369373
pub enum fpos_t {} // TODO: fill this out with a struct
370374

371375
extern {

src/unix/notbsd/linux/mod.rs

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

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

4344
s! {

src/unix/notbsd/mod.rs

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

11+
#[cfg_attr(feature = "extra_traits", derive(Debug))]
1112
pub enum timezone {}
1213

1314
s! {

0 commit comments

Comments
 (0)